Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
StyleCIBot committed Oct 18, 2023
1 parent dda4e0f commit a47df68
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/Foundation/FoundationExceptionsHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -406,13 +406,15 @@ public function getErrorView($e)
private function executeScenarioWhereErrorViewThrowsWhileRenderingAndDebugIs($debug)
{
$this->viewFactory->shouldReceive('exists')->once()->with('errors::404')->andReturn(true);
$this->viewFactory->shouldReceive('make')->once()->withAnyArgs()->andThrow(new Exception("Rendering this view throws an exception"));
$this->viewFactory->shouldReceive('make')->once()->withAnyArgs()->andThrow(new Exception('Rendering this view throws an exception'));

$this->config->shouldReceive('get')->with('app.debug', null)->andReturn($debug);

$handler = new class($this->container) extends Handler
{
protected function registerErrorViewPaths() {}
protected function registerErrorViewPaths()
{
}

public function getErrorView($e)
{
Expand All @@ -427,7 +429,6 @@ public function testItDoesNotCrashIfErrorViewThrowsWhileRenderingAndDebugFalse()
{
// When debug is false, the exception thrown while rendering the error view
// should not bubble as this may trigger an infinite loop.

}

public function testItDoesNotCrashIfErrorViewThrowsWhileRenderingAndDebugTrue()
Expand All @@ -436,7 +437,7 @@ public function testItDoesNotCrashIfErrorViewThrowsWhileRenderingAndDebugTrue()
// the error view as the debug handler should handle this gracefully.

$this->expectException(\Exception::class);
$this->expectExceptionMessage("Rendering this view throws an exception");
$this->expectExceptionMessage('Rendering this view throws an exception');
$this->executeScenarioWhereErrorViewThrowsWhileRenderingAndDebugIs(true);
}

Expand Down

0 comments on commit a47df68

Please sign in to comment.