Skip to content

Commit

Permalink
Updated WhoopsDebugger.php
Browse files Browse the repository at this point in the history
  • Loading branch information
rougin committed Jan 30, 2016
1 parent 9ca78d9 commit f0ae045
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 1 addition & 3 deletions src/Debug/WhoopsDebugger.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ public function display()
*/
public function setHandler(HandlerInterface $handler)
{
$this->whoops->pushHandler(function() use ($handler) {
return $handlers;
});
$this->whoops->pushHandler($handler);
}
}
9 changes: 5 additions & 4 deletions tests/Debug/WhoopsDebuggerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,12 @@ public function testSetEnvironmentMethod()
*/
public function testSetHandlerMethod()
{
$handler = new PrettyPageHandler;
$this->debugger->setHandler(new PrettyPageHandler);

$this->debugger->setHandler($handler);

$this->assertEquals(1, count($this->debugger->getHandlers()));
$this->assertInstanceOf(
'Whoops\Handler\PrettyPageHandler',
$this->debugger->getHandlers()[0]
);
}

/**
Expand Down

0 comments on commit f0ae045

Please sign in to comment.