SplFixedArray_toArray_with-params.phpt 500 B

12345678910111213141516171819
  1. --TEST--
  2. Check that passing a parameter to toArray() produces a correct error
  3. --CREDITS--
  4. PHPNW Testfest 2009 - Paul Court ( g@rgoyle.com )
  5. --FILE--
  6. <?php
  7. // Create a fixed array
  8. $fixedArray = new SplFixedArray(5);
  9. // Fill it up
  10. for ($i=0; $i < 5; $i++) {
  11. $fixedArray[$i] = "PHPNW Testfest";
  12. }
  13. // Test count() returns correct error when parameters are passed.
  14. $fixedArray->count(1);
  15. ?>
  16. --EXPECTF--
  17. Warning: SplFixedArray::count() expects exactly 0 parameters, %d given in %s on line %d