Skip to content

Commit

Permalink
feat: fix PHP 8.4 deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris8934 committed Nov 21, 2024
1 parent 028181b commit 6aee07e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/Knp/Snappy/PdfTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use CallbackFilterIterator;
use DirectoryIterator;
use ReflectionMethod;
use RuntimeException;

class PdfTest extends TestCase
{
Expand Down Expand Up @@ -79,8 +80,9 @@ public function testRemovesLocalFilesOnError(): void
$method->setAccessible(true);
$method->invoke($pdf, 'test', $pdf->getDefaultExtension());
$this->assertEquals(1, \count($pdf->temporaryFiles));
$this->expectException(\RuntimeException::class);
throw new \RuntimeException('test error');
$this->expectException(RuntimeException::class);

throw new RuntimeException('test error');
// @phpstan-ignore-next-line See https://github.com/phpstan/phpstan/issues/7799
$this->assertFileNotExists(\reset($pdf->temporaryFiles));
}
Expand Down

0 comments on commit 6aee07e

Please sign in to comment.