mirror of
https://github.com/php/php-src.git
synced 2024-09-23 10:57:26 +00:00
- Add new test
This commit is contained in:
parent
ddd4482998
commit
91ac043e7e
41
ext/spl/tests/spl_006.phpt
Executable file
41
ext/spl/tests/spl_006.phpt
Executable file
@ -0,0 +1,41 @@
|
||||
--TEST--
|
||||
SPL: iterator_to_array() without keys
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("spl")) print "skip"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$it = new AppendIterator();
|
||||
$it->append(new ArrayIterator(array(1,2)));
|
||||
$it->append(new ArrayIterator(array(2,3)));
|
||||
|
||||
var_dump(iterator_to_array($it));
|
||||
var_dump(iterator_to_array($it, false));
|
||||
var_dump(iterator_to_array($it, true));
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
array(2) {
|
||||
[0]=>
|
||||
int(2)
|
||||
[1]=>
|
||||
int(3)
|
||||
}
|
||||
array(4) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(2)
|
||||
[3]=>
|
||||
int(3)
|
||||
}
|
||||
array(2) {
|
||||
[0]=>
|
||||
int(2)
|
||||
[1]=>
|
||||
int(3)
|
||||
}
|
||||
===DONE===
|
Loading…
Reference in New Issue
Block a user