src/Runners/PHPUnit/Worker/WrapperWorker.php
public function waitForFinishedJob()
    {
        if ($this->inExecution === 0) {
            return;
        }
        $tellsUsItHasFinished = false;
        stream_set_blocking($this->pipes[1], true);
        while ($line = fgets($this->pipes[1])) {
            if (strstr($line, "FINISHED\n")) {
                $tellsUsItHasFinished = true;
                --$this->inExecution;
                break;
            }
        }
        if (!$tellsUsItHasFinished) {
            throw new \RuntimeException('The Worker terminated without finishing the job.');
        }
    }
public function waitForFinishedJob()
    {
        if ($this->inExecution === 0) {
            return;
        }
        $tellsUsItHasFinished = false;
        stream_set_blocking($this->pipes[1], true);
        while ($line = fgets($this->pipes[1])) {
            if (strstr($line, "FINISHED\n")) {
                $tellsUsItHasFinished = true;
                --$this->inExecution;
                break;
            }
        }
        if (!$tellsUsItHasFinished) {
            throw new \RuntimeException('The Worker terminated without finishing the job.');
        }
    }
public function waitForFinishedJob ( ) { if ( $ this -> inExecution === 0 ) { return ; } $ tellsUsItHasFinished = false ; stream_set_blocking ( $ this -> pipes [ 1 ] , true ) ; while ( $ line = fgets ( $ this -> pipes [ 1 ] ) ) { if ( strstr ( $ line , "FINISHED\n" ) ) { $ tellsUsItHasFinished = true ; -- $ this -> inExecution ; break ; } } if ( ! $ tellsUsItHasFinished ) { throw new \ RuntimeException ( 'The Worker terminated without finishing the job.' ) ; } }
This is an utility function for tests.
Refactor or write it only in the test case.
This is an utility function for tests . Refactor or write it only in the test case .