File tree Expand file tree Collapse file tree 2 files changed +19
-7
lines changed
Expand file tree Collapse file tree 2 files changed +19
-7
lines changed Original file line number Diff line number Diff line change 22
33## 3.2.2 under development
44
5- - no changes in this release.
5+ - Enh # 113 : Simplify error log ( @ xepozz )
66
77## 3.2.1 March 07, 2024
88
Original file line number Diff line number Diff line change @@ -22,12 +22,24 @@ public function testRenderVerbose(): void
2222 {
2323 $ renderer = new PlainTextRenderer ();
2424 $ throwable = new RuntimeException ();
25- $ data = $ renderer -> renderVerbose ( $ throwable );
26- $ content = RuntimeException::class . " with message ' { $ throwable -> getMessage ()} ' \n\n in "
27- . $ throwable -> getFile () . ' : ' . $ throwable -> getLine () . "\n\n "
28- . " Stack trace: \n" . $ throwable -> getTraceAsString ()
29- ;
25+ $ expectedContent = sprintf (
26+ <<<TEXT
27+ %s with message "%s "
28+
29+ in %s:%s
3030
31- $ this ->assertSame ($ content , (string ) $ data );
31+ Stack trace:
32+ %s
33+ TEXT ,
34+ $ throwable ::class,
35+ $ throwable ->getMessage (),
36+ $ throwable ->getFile (),
37+ $ throwable ->getLine (),
38+ $ throwable ->getTraceAsString ()
39+ );
40+
41+ $ data = $ renderer ->renderVerbose ($ throwable );
42+ $ this ->assertSame ($ expectedContent , (string ) $ data );
43+ $ this ->assertSame ($ expectedContent , PlainTextRenderer::throwableToString ($ throwable ));
3244 }
3345}
You can’t perform that action at this time.
0 commit comments