false]); assert(is_array($phpunitArgv)); $application = new ApplicationForWrapperWorker( $phpunitArgv, $getopt['progress-file'], $getopt['testresult-file'], $getopt['teamcity-file'] ?? null, $getopt['testdox-file'] ?? null, isset($getopt['testdox-color']), ); while (true) { if (feof(STDIN)) { $application->end(); exit; } $testPath = fgets(STDIN); if ($testPath === false || $testPath === WrapperWorker::COMMAND_EXIT) { $application->end(); exit; } // It must be a 1 byte string to ensure filesize() is equal to the number of tests executed $exitCode = $application->runTest(trim($testPath)); fwrite($statusFile, (string) $exitCode); fflush($statusFile); } })();