Skip to content

Commit aa30bcc

Browse files
committed
Tests & Bench: removed assertion polyfill code for php < 7
1 parent afbd832 commit aa30bcc

File tree

2 files changed

+0
-15
lines changed

2 files changed

+0
-15
lines changed

bench/bootstrap.php

-3
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,5 @@
66
. "Current ini setting: zend.assertions = {$zendassertions}]" . PHP_EOL;
77
exit(1);
88
}
9-
assert_options(ASSERT_ACTIVE, 0);
10-
assert_options(ASSERT_WARNING, 0);
11-
assert_options(ASSERT_BAIL, 0);
129

1310
require_once __DIR__ . '/../vendor/autoload.php';

tests/bootstrap.php

-12
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,6 @@
1111
exit(1);
1212
}
1313

14-
// activate assertions
15-
assert_options(ASSERT_ACTIVE, 1);
16-
assert_options(ASSERT_WARNING, 0);
17-
assert_options(ASSERT_BAIL, 0);
18-
if (!class_exists('AssertionError')) {
19-
// AssertionError has been added in PHP-7.0
20-
class AssertionError extends Exception {};
21-
}
22-
assert_options(ASSERT_CALLBACK, function($file, $line, $code) {
23-
throw new AssertionError("assert(): Assertion '{$code}' failed in {$file} on line {$line}");
24-
});
25-
2614
// installed itself
2715
if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
2816
require_once __DIR__ . '/../vendor/autoload.php';

0 commit comments

Comments
 (0)