summaryrefslogtreecommitdiff
path: root/Zend/tests/assert/expect_010.phpt
blob: 8d52f6479b9a529c3919e899b181f1a5bd0858e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--TEST--
test stack trace is correct from failed exception in extended class (parent implementing constructor)
--INI--
zend.assertions=1
assert.exception=1
--FILE--
<?php
class One {
    public function __construct() {
        assert(false);
    }
}
class Two extends One {}

new Two();
?>
--EXPECTF--
Fatal error: Uncaught exception 'AssertionException' with message 'assert(false)' in %sexpect_010.php:%d
Stack trace:
#0 %sexpect_010.php(%d): assert(false, 'assert(false)')
#1 %sexpect_010.php(%d): One->__construct()
#2 {main}
  thrown in %sexpect_010.php on line %d