Skip to content

Commit e7b01fc

Browse files
author
Thies C. Arntzen
committed
added test for assert
1 parent 08546ef commit e7b01fc

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

ext/standard/tests/assert/assert.phpt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
--TEST--
2+
assert()
3+
--POST--
4+
--GET--
5+
--FILE--
6+
<?
7+
assert_options(ASSERT_ACTIVE,1);
8+
assert_options(ASSERT_CALLBACK,"a");
9+
assert_options(ASSERT_QUIET_EVAL,1);
10+
assert_options(ASSERT_WARNING,0);
11+
assert_options(ASSERT_BAIL,1);
12+
13+
function a($file,$line,$myev)
14+
{ echo "assertion failed $line,\"$myev\"\n";
15+
}
16+
17+
$a = 0;
18+
assert('$a != 0');
19+
?>
20+
--EXPECT--
21+
assertion failed 13,"$a != 0"

0 commit comments

Comments
 (0)