false]); assert(is_array($phpunitArgv)); $application = new ApplicationForWrapperWorker( $phpunitArgv, $getopt['progress-file'], $getopt['unexpected-output-file'], $getopt['test-result-file'], $getopt['result-cache-file'] ?? null, $getopt['teamcity-file'] ?? null, $getopt['testdox-file'] ?? null, isset($getopt['testdox-color']), isset($getopt['testdox-columns']) ? (int) $getopt['testdox-columns'] : null, isset($getopt['testdox-summary']), ); 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, "\n")); fwrite($statusFile, (string) $exitCode); fflush($statusFile); } })();