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

Updated tests namespace to be ps4-valid. Added tests for flooding exception, fixed broken code

This commit is contained in:
Kirk Bushell
2015-10-27 12:48:27 +00:00
parent 5e2f659f54
commit f0883471ef
7 changed files with 27 additions and 5 deletions

View File

@@ -0,0 +1,22 @@
<?php
namespace tests\Flarum\Api\Handler;
use Flarum\Api\Handler\FloodingExceptionHandler;
use Flarum\Core\Exception\FloodingException;
use Tests\Test\TestCase;
class FloodingExceptionHandlerTest extends TestCase
{
private $handler;
public function init()
{
$this->handler = new FloodingExceptionHandler;
}
public function test_it_handles_recognisable_exceptions()
{
$this->assertFalse($this->handler->manages(new \Exception));
$this->assertTrue($this->handler->manages(new FloodingException));
}
}