public function run(
        Process $process,
        AdapterAbstract $testFrameworkAdapter,
        \Closure $onProgressCallback = null
    ) {
        $hasFailure = false;

        $process->run(function (
            $out,
            $data
        ) use (
            $process,
            $testFrameworkAdapter,
            $onProgressCallback,
            &$hasFailure
        ) {
            if ($out == Process::ERR) {
                $hasFailure = true;
            }

            if (!$testFrameworkAdapter->ok($data)) {
                $hasFailure = true;
            }

            $oksCount = $testFrameworkAdapter->hasOks($data);

            if ($oksCount !== false && $onProgressCallback) {
                $onProgressCallback($oksCount);
            }
        });

        $process->stop();

        return $hasFailure;
    }
public function run(
        Process $process,
        AdapterAbstract $testFrameworkAdapter,
        \Closure $onProgressCallback = null
    ) {
        $hasFailure = false;

        $process->run(function (
            $out,
            $data
        ) use (
            $process,
            $testFrameworkAdapter,
            $onProgressCallback,
            &$hasFailure
        ) {
            if ($out == Process::ERR) {
                $hasFailure = true;
            }

            if (!$testFrameworkAdapter->ok($data)) {
                $hasFailure = true;
            }

            $oksCount = $testFrameworkAdapter->hasOks($data);

            if ($oksCount !== false && $onProgressCallback) {
                $onProgressCallback($oksCount);
            }
        });

        $process->stop();

        return $hasFailure;
    }
public function run ( Process $ process , AdapterAbstract $ testFrameworkAdapter , \ Closure $ onProgressCallback = null ) { $ hasFailure = false ; $ process -> run ( function ( $ out , $ data ) use ( $ process , $ testFrameworkAdapter , $ onProgressCallback , & $ hasFailure ) { if ( $ out == Process :: ERR ) { $ hasFailure = true ; } if ( ! $ testFrameworkAdapter -> ok ( $ data ) ) { $ hasFailure = true ; } $ oksCount = $ testFrameworkAdapter -> hasOks ( $ data ) ; if ( $ oksCount !== false && $ onProgressCallback ) { $ onProgressCallback ( $ oksCount ) ; } } ) ; $ process -> stop ( ) ; return $ hasFailure ; }
@param Process $process
@param AdapterAbstract $testFrameworkAdapter
@param callable $onProgressCallback

@return bool
@param Process $process @param AdapterAbstract $testFrameworkAdapter @param callable $onProgressCallback