diff --git a/framework/core/composer.json b/framework/core/composer.json index c81c3f702..10527f74e 100644 --- a/framework/core/composer.json +++ b/framework/core/composer.json @@ -67,7 +67,7 @@ }, "autoload-dev": { "psr-4": { - "tests\\": "tests/" + "Tests\\": "tests/" } }, "scripts": { diff --git a/framework/core/phpunit.yml b/framework/core/phpunit.yml new file mode 100644 index 000000000..e69de29bb diff --git a/framework/core/tests/Flarum/Admin/Middleware/RequireAdministrateAbilityTest.php b/framework/core/tests/Flarum/Admin/Middleware/RequireAdministrateAbilityTest.php index 607000928..261eba796 100644 --- a/framework/core/tests/Flarum/Admin/Middleware/RequireAdministrateAbilityTest.php +++ b/framework/core/tests/Flarum/Admin/Middleware/RequireAdministrateAbilityTest.php @@ -1,5 +1,5 @@ handler = new FloodingExceptionHandler; + } + + public function test_it_handles_recognisable_exceptions() + { + $this->assertFalse($this->handler->manages(new \Exception)); + $this->assertTrue($this->handler->manages(new FloodingException)); + } +} diff --git a/framework/core/tests/Flarum/Core/Settings/DatabaseSettingsRepositoryTest.php b/framework/core/tests/Flarum/Core/Settings/DatabaseSettingsRepositoryTest.php index 3e7929dc1..69b52ce64 100644 --- a/framework/core/tests/Flarum/Core/Settings/DatabaseSettingsRepositoryTest.php +++ b/framework/core/tests/Flarum/Core/Settings/DatabaseSettingsRepositoryTest.php @@ -1,5 +1,5 @@