Browse Source

Add some tests to increase code coverage

experimental/first_unicode_implementation
Etienne Kneuss 18 years ago
parent
commit
422bc27588
  1. 7
      ext/spl/tests/fixedarray_010.phpt
  2. 20
      ext/spl/tests/fixedarray_017.phpt

7
ext/spl/tests/fixedarray_010.phpt

@ -1,12 +1,15 @@
--TEST--
SPL: FixedArray: Setting size to 0
SPL: FixedArray: Setting size
--FILE--
<?php
$a = new SplFixedArray(1);
$a = new SplFixedArray(0);
$a = new SplFixedArray(3);
$a[0] = 1;
$a->setSize(2);
$a->setSize(3);
$a->setSize(0);
print "ok\n";

20
ext/spl/tests/fixedarray_017.phpt

@ -0,0 +1,20 @@
--TEST--
SPL: FixedArray: var_dump
--FILE--
<?php
$a = new SplFixedArray(2);
$a[0] = "foo";
var_dump(empty($a[0]), empty($a[1]), $a);
?>
--EXPECTF--
bool(false)
bool(true)
object(SplFixedArray)#1 (1) {
[u"array":u"SplFixedArray":private]=>
array(2) {
[0]=>
unicode(3) "foo"
[1]=>
NULL
}
}
Loading…
Cancel
Save