Added output test for flooding exception handler

This commit is contained in:
Kirk Bushell 2015-10-27 12:54:10 +00:00
parent 903bb27697
commit 47a9787116

View File

@ -19,4 +19,12 @@ class FloodingExceptionHandlerTest extends TestCase
$this->assertFalse($this->handler->manages(new \Exception)); $this->assertFalse($this->handler->manages(new \Exception));
$this->assertTrue($this->handler->manages(new FloodingException)); $this->assertTrue($this->handler->manages(new FloodingException));
} }
public function test_it_provides_expected_output()
{
$result = $this->handler->handle(new FloodingException);
$this->assertEquals(429, $result->getStatus());
$this->assertEquals([[]], $result->getErrors());
}
} }