Annotation of embedaddon/php/ext/standard/tests/strings/dirname_error.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Test dirname() function : error conditions
! 3: --FILE--
! 4: <?php
! 5: /* Prototype: string dirname ( string $path );
! 6: Description: Returns directory name component of path.
! 7: */
! 8: echo "*** Testing error conditions ***\n";
! 9: // zero arguments
! 10: var_dump( dirname() );
! 11:
! 12: // more than expected no. of arguments
! 13: var_dump( dirname("/var/tmp/bar.gz", ".gz") );
! 14:
! 15: echo "Done\n";
! 16: ?>
! 17: --EXPECTF--
! 18: *** Testing error conditions ***
! 19:
! 20: Warning: dirname() expects exactly 1 parameter, 0 given in %s on line %d
! 21: NULL
! 22:
! 23: Warning: dirname() expects exactly 1 parameter, 2 given in %s on line %d
! 24: NULL
! 25: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>