Skip to content

Commit

Permalink
[test] try/catch for defining ShimmiePHPUnitTestCase
Browse files Browse the repository at this point in the history
  • Loading branch information
shish committed Dec 15, 2024
1 parent d3560c5 commit bc591a4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/testcase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -289,7 +289,9 @@ protected function delete_image(int $image_id): void
}
}
}
} else {
}
// @phpstan-ignore-next-line
catch (\Throwable $e) {
abstract class ShimmiePHPUnitTestCase
{
}
Expand Down

0 comments on commit bc591a4

Please sign in to comment.