mirror of
https://github.com/flarum/framework.git
synced 2024-12-11 21:43:38 +08:00
Added output test for flooding exception handler
This commit is contained in:
parent
903bb27697
commit
47a9787116
|
@ -19,4 +19,12 @@ class FloodingExceptionHandlerTest extends TestCase
|
|||
$this->assertFalse($this->handler->manages(new \Exception));
|
||||
$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());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user