cvs: php-src /ext/spl/tests iterator_056.phpt iterator_057.phpt iterator_058.phpt iterator_059.phpt iterator_060.phpt iterator_061.phpt
iterator_062.phpt iterator_063.phpt iterator_064.phpt iterator_065.phpt iterator_066.phpt iterator_067.phpt
| From: | Etienne Kneuss | Date: | Sun, 15 Jun 2008 11:45:48 +0000 |
| Subject: | cvs: php-src /ext/spl/tests iterator_056.phpt iterator_057.phpt iterator_058.phpt iterator_059.phpt iterator_060.phpt iterator_061.phpt iterator_062.phpt iterator_063.phpt iterator_064.phpt iterator_065.phpt iterator_066.phpt iterator_067.phpt |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-50441@lists.php.net to get a copy of this message | ||
colder Sun Jun 15 11:45:48 2008 UTC
Added files:
/php-src/ext/spl/tests iterator_056.phpt iterator_057.phpt
iterator_058.phpt iterator_059.phpt
iterator_060.phpt iterator_061.phpt
iterator_062.phpt iterator_063.phpt
iterator_064.phpt iterator_065.phpt
iterator_066.phpt iterator_067.phpt
Log:
Add tests for iterators when instanciated without argument (by Sebastian Schürmann)
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/iterator_056.phpt?view=markup&rev=1.1
Index: php-src/ext/spl/tests/iterator_056.phpt
+++ php-src/ext/spl/tests/iterator_056.phpt
--TEST--
SPL: FilterIterator::__construct(void)
--CREDITS--
Sebastian Schürmann
--FILE--
<?php
class myFilterIterator extends FilterIterator {
function accept() {
}
}
try {
$it = new myFilterIterator();
} catch (InvalidArgumentException $e) {
echo 'InvalidArgumentException thrown';
}
?>
--EXPECT--
InvalidArgumentException thrown
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/iterator_057.phpt?view=markup&rev=1.1
Index: php-src/ext/spl/tests/iterator_057.phpt
+++ php-src/ext/spl/tests/iterator_057.phpt
--TEST--
SPL: ArrayIterator::__construct(void)
--CREDITS--
Sebastian Schürmann
--FILE--
<?php
/**
* From Docs: Construct a new array iterator from anything that has a hash table.
* NULL, NOTHING is not a hash table ;)
*/
class myArrayIterator extends ArrayIterator {
}
try {
$it = new myArrayIterator();
} catch (InvalidArgumentException $e) {
echo 'InvalidArgumentException thrown';
}
echo 'no Exception thrown'
?>
--EXPECT--
no Exception thrown
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/iterator_058.phpt?view=markup&rev=1.1
Index: php-src/ext/spl/tests/iterator_058.phpt
+++ php-src/ext/spl/tests/iterator_058.phpt
--TEST--
SPL: Iterator::__construct(void)
--CREDITS--
Sebastian Schürmann
--FILE--
<?php
class myIterator implements Iterator {
function current() {}
function next() {}
function key() {}
function valid() {}
function rewind() {}
}
try {
$it = new myIterator();
} catch (InvalidArgumentException $e) {
echo 'InvalidArgumentException thrown';
}
echo 'no Exception thrown';
?>
--EXPECT--
no Exception thrown
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/iterator_059.phpt?view=markup&rev=1.1
Index: php-src/ext/spl/tests/iterator_059.phpt
+++ php-src/ext/spl/tests/iterator_059.phpt
--TEST--
SPL: CachingIterator::__construct(void)
--CREDITS--
Sebastian Schürmann
--FILE--
<?php
class myCachingIterator extends CachingIterator {
}
try {
$it = new myCachingIterator();
} catch (InvalidArgumentException $e) {
echo 'InvalidArgumentException thrown';
}
?>
--EXPECT--
InvalidArgumentException thrown
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/iterator_060.phpt?view=markup&rev=1.1
Index: php-src/ext/spl/tests/iterator_060.phpt
+++ php-src/ext/spl/tests/iterator_060.phpt
--TEST--
SPL: RecursiveCachingIterator::__construct(void)
--CREDITS--
Sebastian Schürmann
--FILE--
<?php
class myRecursiveCachingIterator extends RecursiveCachingIterator {
}
try {
$it = new myRecursiveCachingIterator();
} catch (InvalidArgumentException $e) {
echo 'InvalidArgumentException thrown';
}
?>
--EXPECT--
InvalidArgumentException thrown
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/iterator_061.phpt?view=markup&rev=1.1
Index: php-src/ext/spl/tests/iterator_061.phpt
+++ php-src/ext/spl/tests/iterator_061.phpt
--TEST--
SPL: ParentIterator::__construct(void)
--CREDITS--
Sebastian Schürmann
--FILE--
<?php
class myParentIterator extends ParentIterator {
}
try {
$it = new myParentIterator();
} catch (InvalidArgumentException $e) {
echo 'InvalidArgumentException thrown';
}
?>
--EXPECT--
InvalidArgumentException thrown
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/iterator_062.phpt?view=markup&rev=1.1
Index: php-src/ext/spl/tests/iterator_062.phpt
+++ php-src/ext/spl/tests/iterator_062.phpt
--TEST--
SPL: RecursiveIteratorIterator::__construct(void)
--CREDITS--
Sebastian Schürmann
--FILE--
<?php
class myRecursiveIteratorIterator extends RecursiveIteratorIterator {
}
try {
$it = new myRecursiveIteratorIterator();
} catch (InvalidArgumentException $e) {
echo 'InvalidArgumentException thrown';
}
?>
--EXPECT--
InvalidArgumentException thrown
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/iterator_063.phpt?view=markup&rev=1.1
Index: php-src/ext/spl/tests/iterator_063.phpt
+++ php-src/ext/spl/tests/iterator_063.phpt
--TEST--
SPL: LimitIterator::__construct(void)
--CREDITS--
Sebastian Schürmann
--FILE--
<?php
class myLimitIterator extends LimitIterator {
}
try {
$it = new myLimitIterator();
} catch (InvalidArgumentException $e) {
echo 'InvalidArgumentException thrown';
}
?>
--EXPECT--
InvalidArgumentException thrown
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/iterator_064.phpt?view=markup&rev=1.1
Index: php-src/ext/spl/tests/iterator_064.phpt
+++ php-src/ext/spl/tests/iterator_064.phpt
--TEST--
SPL: CachingIterator::__construct(void)
--CREDITS--
Sebastian Schürmann
--FILE--
<?php
class myCachingIterator extends CachingIterator {}
try {
$it = new myCachingIterator();
} catch (InvalidArgumentException $e) {
echo 'InvalidArgumentException thrown';
}
?>
--EXPECT--
InvalidArgumentException thrown
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/iterator_065.phpt?view=markup&rev=1.1
Index: php-src/ext/spl/tests/iterator_065.phpt
+++ php-src/ext/spl/tests/iterator_065.phpt
--TEST--
SPL: RecursiveCachingIterator::__construct(void)
--CREDITS--
Sebastian Schürmann
--FILE--
<?php
class myRecursiveCachingIterator extends RecursiveCachingIterator {}
try {
$it = new myRecursiveCachingIterator();
} catch (InvalidArgumentException $e) {
echo 'InvalidArgumentException thrown';
}
?>
--EXPECT--
InvalidArgumentException thrown
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/iterator_066.phpt?view=markup&rev=1.1
Index: php-src/ext/spl/tests/iterator_066.phpt
+++ php-src/ext/spl/tests/iterator_066.phpt
--TEST--
SPL: NoRewindIterator::__construct(void)
--CREDITS--
Sebastian Schürmann
--FILE--
<?php
class myNoRewindIterator extends NoRewindIterator {}
try {
$it = new myNoRewindIterator();
} catch (InvalidArgumentException $e) {
echo 'InvalidArgumentException thrown';
}
?>
--EXPECT--
InvalidArgumentException thrown
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/iterator_067.phpt?view=markup&rev=1.1
Index: php-src/ext/spl/tests/iterator_067.phpt
+++ php-src/ext/spl/tests/iterator_067.phpt
--TEST--
SPL: AppendIterator::__construct(void)
--CREDITS--
Sebastian Schürmann
--FILE--
<?php
class myAppendIterator extends AppendIterator {}
try {
$it = new myAppendIterator();
echo "no exception";
} catch (InvalidArgumentException $e) {
echo 'InvalidArgumentException thrown';
}
?>
--EXPECT--
no exception