zoe Fri Jul 13 14:57:32 2007 UTC
Added files:
/php-src/ext/standard/tests/assert assert_basic2.phpt
Log:
Assert test
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/assert/assert_basic2.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/assert/assert_basic2.phpt
+++ php-src/ext/standard/tests/assert/assert_basic2.phpt
--TEST--
assert() basic - correct call back values before and after assert.
--INI--
assert.active = 1
assert.warning = 1
assert.callback=f1
assert.bail = 0
assert.quiet_eval = 0
--FILE--
<?php
function f2()
{
echo "f2 called\n";
}
function f1()
{
echo "f1 called\n";
}
var_dump($o = assert_options(ASSERT_CALLBACK));
assert(0);
var_dump($o= assert_options(ASSERT_CALLBACK, "f2"));
var_dump($n= assert_options(ASSERT_CALLBACK));
assert(0);
?>
--EXPECTF--
string(2) "f1"
f1 called
Warning: assert(): Assertion failed in %s on line 13
string(2) "f1"
string(2) "f2"
f2 called
Warning: assert(): Assertion failed in %s on line 17
--UEXPECTF--
unicode(2) "f1"
f1 called
Warning: assert(): Assertion failed in %s on line 13
unicode(2) "f1"
unicode(2) "f2"
f2 called
Warning: assert(): Assertion failed in %s on line 17
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php