diff --git a/tests/BiomeJsBinaryTest.php b/tests/BiomeJsBinaryTest.php index 2558198..051f5c8 100644 --- a/tests/BiomeJsBinaryTest.php +++ b/tests/BiomeJsBinaryTest.php @@ -1,4 +1,5 @@ remove($binaryDownloadDir); @@ -31,14 +32,14 @@ public function testBinaryIsDownloadedIfNotExists(): void $client ); $process = $binary->createProcess(['check', '--apply', '*.{js,ts}']); - $this->assertFileExists($binaryDownloadDir.'/fake-version/'.BiomeJsBinary::getBinaryName()); + $this->assertFileExists($binaryDownloadDir . '/fake-version/' . BiomeJsBinary::getBinaryName()); // Windows doesn't wrap arguments in quotes $expectedTemplate = '\\' === \DIRECTORY_SEPARATOR ? '"%s" check --apply *.{js,ts}' : "'%s' 'check' '--apply' '*.{js,ts}'"; $this->assertSame( - sprintf($expectedTemplate, $binaryDownloadDir.'/fake-version/'.BiomeJsBinary::getBinaryName()), + sprintf($expectedTemplate, $binaryDownloadDir . '/fake-version/' . BiomeJsBinary::getBinaryName()), $process->getCommandLine() ); } -} \ No newline at end of file +} diff --git a/tests/FunctionalTest.php b/tests/FunctionalTest.php index fa75942..0551822 100644 --- a/tests/FunctionalTest.php +++ b/tests/FunctionalTest.php @@ -1,4 +1,5 @@ remove($biomejsVarDir); } } @@ -22,13 +23,14 @@ protected function setUp(): void public function testCommandCheck(): void { self::bootKernel(); + self::assertNotNull(self::$kernel); $application = new Application(self::$kernel); $command = $application->find('biomejs:check'); $commandTester = new CommandTester($command); $statusCode = $commandTester->execute([ - 'path' => [__DIR__.'/fixtures/'], + 'path' => [__DIR__ . '/fixtures/'], ]); self::assertSame(Command::FAILURE, $statusCode, 'The command should return a non-zero exit code'); @@ -45,13 +47,14 @@ public function testCommandCheck(): void public function testCommandCi(): void { self::bootKernel(); + self::assertNotNull(self::$kernel); $application = new Application(self::$kernel); $command = $application->find('biomejs:ci'); $commandTester = new CommandTester($command); $statusCode = $commandTester->execute([ - 'path' => [__DIR__.'/fixtures/'], + 'path' => [__DIR__ . '/fixtures/'], ]); self::assertSame(Command::FAILURE, $statusCode, 'The command should return a non-zero exit code'); @@ -64,4 +67,4 @@ public function testCommandCi(): void self::assertStringContainsString('BiomeJsBundle/tests/fixtures/bootstrap.js format', $output); self::assertStringContainsString('File content differs from formatting output', $output); } -} \ No newline at end of file +} diff --git a/tests/KocalBiomeJsBundleTest.php b/tests/KocalBiomeJsBundleTest.php index 7634bec..b5ee51d 100644 --- a/tests/KocalBiomeJsBundleTest.php +++ b/tests/KocalBiomeJsBundleTest.php @@ -1,4 +1,5 @@ getContainerExtension()); } -} \ No newline at end of file +} diff --git a/tests/fixtures/BiomeJsTestKernel.php b/tests/fixtures/BiomeJsTestKernel.php index 71a3548..46656ff 100644 --- a/tests/fixtures/BiomeJsTestKernel.php +++ b/tests/fixtures/BiomeJsTestKernel.php @@ -1,4 +1,5 @@ setParameter('biomejs.use_tty', false); @@ -43,16 +43,16 @@ protected function configureContainer(ContainerBuilder $container, LoaderInterfa public function getCacheDir(): string { - return sys_get_temp_dir().'/cache'.spl_object_hash($this); + return sys_get_temp_dir() . '/cache' . spl_object_hash($this); } public function getLogDir(): string { - return sys_get_temp_dir().'/logs'.spl_object_hash($this); + return sys_get_temp_dir() . '/logs' . spl_object_hash($this); } public function getProjectDir(): string { return __DIR__; } -} \ No newline at end of file +}