Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit f1400b9

Browse files
committed
[#125] Adds expectation to whoops prophecy
- The Whoops runtime should now be injected with a pretty page handler, per #125.
1 parent 2f29555 commit f1400b9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/WhoopsErrorHandlerTest.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,13 @@ public function testExceptionErrorPreparesPageHandlerAndInvokesWhoops()
4545
{
4646
$exception = new Exception('Boom!');
4747

48-
$whoops = $this->getWhoops();
49-
$whoops->handleException($exception)->willReturn('Whoops content');
50-
5148
$pageHandler = $this->getPrettyPageHandler();
5249
$pageHandler->addDataTable('Expressive Application Request', Argument::type('array'))->shouldBeCalled();
5350

51+
$whoops = $this->getWhoops();
52+
$whoops->handleException($exception)->willReturn('Whoops content');
53+
$whoops->pushHandler(Argument::type(PrettyPageHandler::class))->shouldBeCalled();
54+
5455
$handler = new WhoopsErrorHandler($whoops->reveal(), $pageHandler->reveal());
5556

5657
$stream = $this->prophesize(StreamInterface::class);

0 commit comments

Comments
 (0)