Skip to content

Commit

Permalink
[zendframework#125] Adds expectation to whoops prophecy
Browse files Browse the repository at this point in the history
- The Whoops runtime should now be injected with a pretty page handler,
  per zendframework#125.
  • Loading branch information
weierophinney committed Sep 10, 2015
1 parent 2f29555 commit f1400b9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/WhoopsErrorHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,13 @@ public function testExceptionErrorPreparesPageHandlerAndInvokesWhoops()
{
$exception = new Exception('Boom!');

$whoops = $this->getWhoops();
$whoops->handleException($exception)->willReturn('Whoops content');

$pageHandler = $this->getPrettyPageHandler();
$pageHandler->addDataTable('Expressive Application Request', Argument::type('array'))->shouldBeCalled();

$whoops = $this->getWhoops();
$whoops->handleException($exception)->willReturn('Whoops content');
$whoops->pushHandler(Argument::type(PrettyPageHandler::class))->shouldBeCalled();

$handler = new WhoopsErrorHandler($whoops->reveal(), $pageHandler->reveal());

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

0 comments on commit f1400b9

Please sign in to comment.