mirror of
https://github.com/filp/whoops.git
synced 2026-09-12 02:36:20 +00:00
Improve Whoops\Run test coverage
This commit is contained in:
@@ -78,6 +78,26 @@ class RunTest extends TestCase
|
||||
$this->assertContains($handlerTwo, $handlers);
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException InvalidArgumentException
|
||||
* @covers Whoops\Run::pushHandler
|
||||
*/
|
||||
public function testPushInvalidHandler()
|
||||
{
|
||||
$run = $this->getRunInstance();
|
||||
$run->pushHandler($banana = 'actually turnip');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Whoops\Run::pushHandler
|
||||
*/
|
||||
public function testPushClosureBecomesHandler()
|
||||
{
|
||||
$run = $this->getRunInstance();
|
||||
$run->pushHandler(function() {});
|
||||
$this->assertInstanceOf('Whoops\\Handler\\CallbackHandler', $run->popHandler());
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Whoops\Run::popHandler
|
||||
* @covers Whoops\Run::getHandlers
|
||||
|
||||
Reference in New Issue
Block a user