File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <?php
2+
3+ /*
4+ * This file is part of Chevere.
5+ *
6+ * (c) Rodolfo Berrios <rodolfo@chevere.org>
7+ *
8+ * For the full copyright and license information, please view the LICENSE
9+ * file that was distributed with this source code.
10+ */
11+
12+ declare (strict_types=1 );
13+
14+ require_once 'autoload.php ' ;
15+
16+ xr ('BACKTRACE ' , f: XR_BACKTRACE );
17+
18+ include __DIR__ . '/traces/a.php ' ;
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ /*
4+ * This file is part of Chevere.
5+ *
6+ * (c) Rodolfo Berrios <rodolfo@chevere.org>
7+ *
8+ * For the full copyright and license information, please view the LICENSE
9+ * file that was distributed with this source code.
10+ */
11+
12+ declare (strict_types=1 );
13+
14+ xr ('A ' , f: XR_BACKTRACE );
15+
16+ include __DIR__ . '/b.php ' ;
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ /*
4+ * This file is part of Chevere.
5+ *
6+ * (c) Rodolfo Berrios <rodolfo@chevere.org>
7+ *
8+ * For the full copyright and license information, please view the LICENSE
9+ * file that was distributed with this source code.
10+ */
11+
12+ declare (strict_types=1 );
13+
14+ xr ('B ' , f: XR_BACKTRACE );
15+
16+ include __DIR__ . '/c.php ' ;
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ /*
4+ * This file is part of Chevere.
5+ *
6+ * (c) Rodolfo Berrios <rodolfo@chevere.org>
7+ *
8+ * For the full copyright and license information, please view the LICENSE
9+ * file that was distributed with this source code.
10+ */
11+
12+ declare (strict_types=1 );
13+
14+ xr ('C ' , f: XR_BACKTRACE );
Original file line number Diff line number Diff line change @@ -204,8 +204,9 @@ private function handleBacktrace(): void
204204 $ this ->backtrace ,
205205 new ThrowableHandlerHtmlFormat ()
206206 );
207+ $ count = count ($ trace ->toArray ());
207208 $ this ->body .= <<<HTML
208- <div class="xrdebug-backtrace"> {$ trace ->__toString ()}</div>
209+ <div class="xrdebug-backtrace" data-count=" { $ count } " > {$ trace ->__toString ()}</div>
209210 HTML ;
210211 }
211212}
Original file line number Diff line number Diff line change @@ -172,7 +172,7 @@ public function testWithBacktraceFlag(): void
172172 $ withBacktraceFlag = $ message ->withFlags (XR_BACKTRACE );
173173 $ this ->assertNotSame ($ message , $ withBacktraceFlag );
174174 $ this ->assertTrue ($ withBacktraceFlag ->isEnableBacktrace ());
175- $ expected = $ body . '<div class="xrdebug-backtrace"> ' ;
175+ $ expected = $ body . '<div class="xrdebug-backtrace" data-count="13" > ' ;
176176 $ this ->assertStringContainsString (
177177 $ expected ,
178178 $ withBacktraceFlag ->toArray ()['body ' ]
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ public function testWithPrevious(): void
8888 $ body = strip_tags ($ parser ->body ());
8989 $ this ->assertStringContainsString (
9090 <<<PLAIN
91- # 0 {$ file }: {$ line }
91+ 0 {$ file }: {$ line }
9292 {main}()
9393 PLAIN ,
9494 $ body
You can’t perform that action at this time.
0 commit comments