xref: /PHP-7.4/Zend/tests/assert/expect_009.phpt (revision 482985ca)
1--TEST--
2test stack trace is correct from failed exception in extended class
3--INI--
4zend.assertions=1
5assert.exception=1
6--FILE--
7<?php
8class One {
9    public function __construct() {
10    }
11}
12class Two extends One {
13    public function __construct() {
14        assert(false);
15    }
16}
17new Two();
18?>
19--EXPECTF--
20Fatal error: Uncaught AssertionError: assert(false) in %sexpect_009.php:%d
21Stack trace:
22#0 %sexpect_009.php(%d): assert(false, 'assert(false)')
23#1 %sexpect_009.php(%d): Two->__construct()
24#2 {main}
25  thrown in %sexpect_009.php on line %d
26