diff --git a/tests/CompiledInjectorTest.php b/tests/CompiledInjectorTest.php index 1564dbf..04f3f73 100644 --- a/tests/CompiledInjectorTest.php +++ b/tests/CompiledInjectorTest.php @@ -67,8 +67,8 @@ public function testSingleton(): void public function testSerialize(): void { - deleteFiles(__DIR__ . '/tmp'); $scriptDir = __DIR__ . '/tmp'; + deleteFiles($scriptDir); (new Compiler())->compile($scriptDir, new FakeLazyModule()); $injector = new CompiledInjector($scriptDir); $injector = unserialize(serialize($injector)); @@ -78,9 +78,9 @@ public function testSerialize(): void public function testUnbound(): void { - deleteFiles(__DIR__ . '/tmp'); - $this->expectException(Unbound::class); $scriptDir = __DIR__ . '/tmp'; + deleteFiles($scriptDir); + $this->expectException(Unbound::class); $injector = new CompiledInjector($scriptDir); $injector->getInstance(FakeCar2::class); }