imap_alerts_error.phpt 885 B

12345678910111213141516171819202122232425262728293031
  1. --TEST--
  2. Test imap_alerts() function : error conditions
  3. --SKIPIF--
  4. <?php
  5. require_once(dirname(__FILE__).'/skipif.inc');
  6. ?>
  7. --FILE--
  8. <?php
  9. /* Prototype : array imap_alerts(void)
  10. * Description: Returns an array of all IMAP alerts that have been generated since the last page load or since the last imap_alerts() call, whichever came last. The alert stack is cleared after imap_alerts() is called.
  11. * Source code: ext/imap/php_imap.c
  12. * Alias to functions:
  13. */
  14. echo "*** Testing imap_alerts() : error conditions ***\n";
  15. // One argument
  16. echo "\n-- Testing imap_alerts() function with one argument --\n";
  17. $extra_arg = 10;
  18. var_dump( imap_alerts($extra_arg) );
  19. ?>
  20. ===DONE===
  21. --EXPECTF--
  22. *** Testing imap_alerts() : error conditions ***
  23. -- Testing imap_alerts() function with one argument --
  24. Warning: imap_alerts() expects exactly 0 parameters, 1 given in %s on line %d
  25. NULL
  26. ===DONE===