From a4ef9e7cf4d7c37d585d8002d3c92b3f7663e776 Mon Sep 17 00:00:00 2001 From: Kirk Bushell Date: Tue, 27 Oct 2015 12:54:10 +0000 Subject: [PATCH] Added output test for flooding exception handler --- tests/Flarum/Api/Handler/FloodingExceptionHandlerTest.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/Flarum/Api/Handler/FloodingExceptionHandlerTest.php b/tests/Flarum/Api/Handler/FloodingExceptionHandlerTest.php index 9399b1524..504c462b7 100644 --- a/tests/Flarum/Api/Handler/FloodingExceptionHandlerTest.php +++ b/tests/Flarum/Api/Handler/FloodingExceptionHandlerTest.php @@ -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()); + } }