SplFixedArray_count_checkParams.phpt 348 B

12345678910111213141516
  1. --TEST--
  2. Makes sure that an integer cannot be passed into the count() method of the splFixedArray.
  3. --CREDITS--
  4. PHPNW Test Fest 2009 - Rick Ogden
  5. --FILE--
  6. <?php
  7. $ar = new SplFixedArray(3);
  8. $ar[0] = 1;
  9. $ar[1] = 2;
  10. $ar[2] = 3;
  11. echo $ar->count(3);
  12. ?>
  13. --EXPECTF--
  14. Warning: SplFixedArray::count() expects exactly 0 parameters, 1 given in %s on line %d