diff --git a/core/testcase.php b/core/testcase.php index f7cff2a0f..373befb31 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,9 @@ protected function delete_image(int $image_id): void } } } -} else { +} +// @phpstan-ignore-next-line +catch (\Throwable $e) { abstract class ShimmiePHPUnitTestCase { }