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 14, 2024
1 parent e426904 commit 6fbb05e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 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,7 @@ protected function delete_image(int $image_id): void
}
}
}
} else {
} catch (\Throwable $e) {

Check failure on line 292 in core/testcase.php

View workflow job for this annotation

GitHub Actions / Static Analysis

Dead catch - Throwable is never thrown in the try block.
abstract class ShimmiePHPUnitTestCase
{
}
Expand Down

0 comments on commit 6fbb05e

Please sign in to comment.