diff --git a/core/testcase.php b/core/testcase.php index f7cff2a0f..37160efc6 100644 --- a/core/testcase.php +++ b/core/testcase.php @@ -4,7 +4,7 @@ namespace Shimmie2; -if (class_exists("\\PHPUnit\\Framework\\TestCase")) { +try { abstract class ShimmiePHPUnitTestCase extends \PHPUnit\Framework\TestCase { protected static string $anon_name = "anonymous"; @@ -289,7 +289,7 @@ protected function delete_image(int $image_id): void } } } -} else { +} catch (\Throwable $e) { abstract class ShimmiePHPUnitTestCase { }