33namespace PHPStan \Parallel ;
44
55use Nette \Utils \Json ;
6+ use PHPStan \File \FileHelper ;
67use PHPUnit \Framework \TestCase ;
78
89class ParallelAnalyserIntegrationTest extends TestCase
@@ -22,13 +23,13 @@ public function dataRun(): array
2223 */
2324 public function testRun (string $ command ): void
2425 {
25- exec (sprintf ('%s %s clear-result-cache --configuration %s ' , escapeshellarg (PHP_BINARY ), escapeshellarg (__DIR__ . '/../../../bin/phpstan ' ), escapeshellarg (__DIR__ . '/parallel-analyser.neon ' )), $ clearResultCacheOutputLines , $ clearResultCacheExitCode );
26+ exec (sprintf ('%s %s clear-result-cache --configuration %s -q ' , escapeshellarg (PHP_BINARY ), escapeshellarg (__DIR__ . '/../../../bin/phpstan ' ), escapeshellarg (__DIR__ . '/parallel-analyser.neon ' )), $ clearResultCacheOutputLines , $ clearResultCacheExitCode );
2627 if ($ clearResultCacheExitCode !== 0 ) {
2728 throw new \PHPStan \ShouldNotHappenException ('Could not clear result cache. ' );
2829 }
2930
3031 exec (sprintf (
31- '%s %s %s -l 8 -c %s --error-format json %s ' ,
32+ '%s %s %s -l 8 -c %s --error-format json --no-progress %s ' ,
3233 escapeshellarg (PHP_BINARY ),
3334 escapeshellarg (__DIR__ . '/../../../bin/phpstan ' ),
3435 $ command ,
@@ -41,13 +42,16 @@ public function testRun(string $command): void
4142 ]))
4243 ), $ outputLines , $ exitCode );
4344 $ output = implode ("\n" , $ outputLines );
45+
46+ $ fileHelper = new FileHelper (__DIR__ );
47+ $ filePath = $ fileHelper ->normalizePath (__DIR__ . '/data/trait-definition.php ' );
4448 $ this ->assertJsonStringEqualsJsonString (Json::encode ([
4549 'totals ' => [
4650 'errors ' => 0 ,
4751 'file_errors ' => 3 ,
4852 ],
4953 'files ' => [
50- sprintf ('%s/data/trait-definition.php (in context of class ParallelAnalyserIntegrationTest \\Bar) ' , __DIR__ ) => [
54+ sprintf ('%s (in context of class ParallelAnalyserIntegrationTest \\Bar) ' , $ filePath ) => [
5155 'errors ' => 1 ,
5256 'messages ' => [
5357 [
@@ -57,7 +61,7 @@ public function testRun(string $command): void
5761 ],
5862 ],
5963 ],
60- sprintf ('%s/data/trait-definition.php (in context of class ParallelAnalyserIntegrationTest \\Foo) ' , __DIR__ ) => [
64+ sprintf ('%s (in context of class ParallelAnalyserIntegrationTest \\Foo) ' , $ filePath ) => [
6165 'errors ' => 2 ,
6266 'messages ' => [
6367 [
0 commit comments