xref: /PHP-7.1/Zend/tests/assert/expect_008.phpt (revision 482985ca)
1--TEST--
2test disabled expectations have no ill side effects
3--INI--
4zend.assertions=0
5assert.exception=1
6--FILE--
7<?php
8class One {
9    public function __construct() {
10        assert($this || 0);
11    }
12}
13class Two extends One {}
14
15class OdEar extends AssertionError {}
16
17function blah(){ return 1; }
18
19$variable = 1;
20assert(true, "constant message");
21assert(($variable && $variable) || php_sapi_name(), new OdEar("constant message"));
22assert(false);
23assert(blah(), blah());
24
25new Two();
26new Two();
27new Two();
28
29assert (blah() || blah() || blah(), blah() || blah() || blah() || blah());
30
31var_dump(true);
32?>
33--EXPECT--
34bool(true)
35