1
0
mirror of https://github.com/flarum/core.git synced 2025-07-30 21:20:24 +02:00

Added output test for flooding exception handler

This commit is contained in:
Kirk Bushell
2015-10-27 12:54:10 +00:00
parent f230c72ebb
commit a4ef9e7cf4

View File

@@ -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());
}
}