summaryrefslogtreecommitdiff
path: root/ext/standard/tests/assert/assert_basic6.phpt
diff options
context:
space:
mode:
authorMáté Kocsis <kocsismate@woohoolabs.com>2020-08-05 18:45:07 +0200
committerMáté Kocsis <kocsismate@woohoolabs.com>2020-08-07 12:35:30 +0200
commitaf80d8a14e5540a151e2b40f165ebe122467484b (patch)
treec852017699321228cb32ae5764f817ee64be1a2a /ext/standard/tests/assert/assert_basic6.phpt
parent3bb183036976fc8bfdf039b41efe1e4312894937 (diff)
downloadphp-git-af80d8a14e5540a151e2b40f165ebe122467484b.tar.gz
Add more argument types to stubs
Closes GH-5943
Diffstat (limited to 'ext/standard/tests/assert/assert_basic6.phpt')
-rw-r--r--ext/standard/tests/assert/assert_basic6.phpt40
1 files changed, 40 insertions, 0 deletions
diff --git a/ext/standard/tests/assert/assert_basic6.phpt b/ext/standard/tests/assert/assert_basic6.phpt
new file mode 100644
index 0000000000..fdeffb057c
--- /dev/null
+++ b/ext/standard/tests/assert/assert_basic6.phpt
@@ -0,0 +1,40 @@
+--TEST--
+assert() - Remove the assert callback
+--INI--
+assert.active=1
+--FILE--
+<?php
+
+function f1()
+{
+ echo "foo\n";
+}
+
+assert_options(ASSERT_CALLBACK, "f1");
+var_dump(assert_options(ASSERT_CALLBACK));
+
+try {
+ assert(false);
+} catch (AssertionError $exception) {
+ echo $exception->getMessage() . "\n";
+}
+
+echo "\n";
+
+assert_options(ASSERT_CALLBACK, null);
+var_dump(assert_options(ASSERT_CALLBACK));
+
+try {
+ assert(false);
+} catch (AssertionError $exception) {
+ echo $exception->getMessage() . "\n";
+}
+
+?>
+--EXPECT--
+string(2) "f1"
+foo
+assert(false)
+
+NULL
+assert(false)