From 2b4d689bc7339874ca39abc740e0eed2bc8c7ef5 Mon Sep 17 00:00:00 2001 From: jmsche Date: Sun, 30 Aug 2026 16:43:54 +0200 Subject: [PATCH] Fix some tests that were marked as skipped --- phpstan-baseline.neon | 12 ------------ tests/ManagerTest.php | 10 ++++------ 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 5d024ce..404a5f5 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -114,18 +114,6 @@ parameters: count: 1 path: tests/LeaptImTestingKernel.php - - - rawMessage: 'Property Leapt\ImBundle\Tests\ManagerTest::$root is never read, only written.' - identifier: property.onlyWritten - count: 1 - path: tests/ManagerTest.php - - - - rawMessage: Unreachable statement - code above always terminates. - identifier: deadCode.unreachable - count: 3 - path: tests/ManagerTest.php - - rawMessage: 'Method Leapt\ImBundle\Tests\Mock\Process::run() overrides @final method Symfony\Component\Process\Process::run().' identifier: method.parentMethodFinalByPhpDoc diff --git a/tests/ManagerTest.php b/tests/ManagerTest.php index 3481598..8db1fbe 100644 --- a/tests/ManagerTest.php +++ b/tests/ManagerTest.php @@ -24,7 +24,7 @@ final class ManagerTest extends TestCase protected function setUp(): void { $this->root = vfsStream::setup('/root'); - $this->projectDir = 'vfs://app'; + $this->projectDir = 'vfs://root/app'; $this->publicPath = '../public'; $this->cachePath = 'cache/im'; } @@ -62,7 +62,6 @@ public function testSetCachePath(Manager $manager): void #[Depends('testConstruct')] public function testCacheExists(Manager $manager): void { - $this->markTestSkipped(); $this->root = vfsStream::setup('/root'); $filepath = 'somefile'; $format = '50x'; @@ -87,7 +86,6 @@ public function testCacheExists(Manager $manager): void #[Depends('testConstruct')] public function testGetCacheContent(Manager $manager): void { - $this->markTestSkipped(); $structure = [ 'app' => [], 'public' => [ @@ -141,7 +139,8 @@ public function testConvertFormatException(Manager $manager): void #[Depends('testConstruct')] public function testCheckImage(Manager $manager): void { - $this->markTestSkipped(); + $this->expectNotToPerformAssertions(); + $structure = [ 'app' => [], 'public' => [ @@ -156,8 +155,7 @@ public function testCheckImage(Manager $manager): void $method = new \ReflectionMethod($manager, 'checkImage'); $method->invoke($manager, 'uploads/somefile'); - $method->invoke($manager, 'vfs://public/uploads/somefile'); - $this->assertTrue(true); + $method->invoke($manager, 'vfs://root/public/uploads/somefile'); } #[Depends('testConstruct')]