File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,21 @@ public function testDetermineViewsRuntimeExceptionCode404(): void
7070 $ this ->assertSame ('error_404.php ' , $ viewFile );
7171 }
7272
73+ public function testDetermineViewsDisplayErrorsOffRuntimeException (): void
74+ {
75+ ini_set ('display_errors ' , '0 ' );
76+
77+ $ determineView = $ this ->getPrivateMethodInvoker ($ this ->handler , 'determineView ' );
78+
79+ $ exception = new RuntimeException ('Exception ' );
80+ $ templatePath = APPPATH . 'Views/errors/html ' ;
81+ $ viewFile = $ determineView ($ exception , $ templatePath );
82+
83+ $ this ->assertSame ('production.php ' , $ viewFile );
84+
85+ ini_set ('display_errors ' , '1 ' );
86+ }
87+
7388 public function testCollectVars (): void
7489 {
7590 $ collectVars = $ this ->getPrivateMethodInvoker ($ this ->handler , 'collectVars ' );
You can’t perform that action at this time.
0 commit comments