private function resolveResult(): string
    {
        $exitCode = $this->getProcess()->getExitCode();

        // If the process was not even started, mark its result as failed
        if ($exitCode === null) {
            return self::PROCESS_RESULT_FAILED;
        }

        switch ($exitCode) {
            case TestRunner::SUCCESS_EXIT: // all tests passed
                $result = self::PROCESS_RESULT_PASSED;
                // for passed process save just the status and result; end time was saved by TestStatusListener
                break;
            case 15: // Process killed because of timeout, or
            case 9: // Process terminated because of timeout
                $result = self::PROCESS_RESULT_FATAL;
                break;
            case 255: // PHP fatal error
                $result = self::PROCESS_RESULT_FATAL;
                break;
            case TestRunner::EXCEPTION_EXIT: // exception thrown from phpunit
            case TestRunner::FAILURE_EXIT: // some test failed
            default:
                $result = self::PROCESS_RESULT_FAILED;
                break;
        }

        return $result;
    }
private function resolveResult(): string
    {
        $exitCode = $this->getProcess()->getExitCode();

        // If the process was not even started, mark its result as failed
        if ($exitCode === null) {
            return self::PROCESS_RESULT_FAILED;
        }

        switch ($exitCode) {
            case TestRunner::SUCCESS_EXIT: // all tests passed
                $result = self::PROCESS_RESULT_PASSED;
                // for passed process save just the status and result; end time was saved by TestStatusListener
                break;
            case 15: // Process killed because of timeout, or
            case 9: // Process terminated because of timeout
                $result = self::PROCESS_RESULT_FATAL;
                break;
            case 255: // PHP fatal error
                $result = self::PROCESS_RESULT_FATAL;
                break;
            case TestRunner::EXCEPTION_EXIT: // exception thrown from phpunit
            case TestRunner::FAILURE_EXIT: // some test failed
            default:
                $result = self::PROCESS_RESULT_FAILED;
                break;
        }

        return $result;
    }
private function resolveResult ( ) : string { $ exitCode = $ this -> getProcess ( ) -> getExitCode ( ) ; // If the process was not even started, mark its result as failed if ( $ exitCode === null ) { return self :: PROCESS_RESULT_FAILED ; } switch ( $ exitCode ) { case TestRunner :: SUCCESS_EXIT : // all tests passed $ result = self :: PROCESS_RESULT_PASSED ; // for passed process save just the status and result; end time was saved by TestStatusListener break ; case 15 : // Process killed because of timeout, or case 9 : // Process terminated because of timeout $ result = self :: PROCESS_RESULT_FATAL ; break ; case 255 : // PHP fatal error $ result = self :: PROCESS_RESULT_FATAL ; break ; case TestRunner :: EXCEPTION_EXIT : // exception thrown from phpunit case TestRunner :: FAILURE_EXIT : // some test failed default : $ result = self :: PROCESS_RESULT_FAILED ; break ; } return $ result ; }
Resolve result of finished process
Resolve result of finished process