public function run()
    {
        $this->createProcess();

        foreach ($this->steps as $step) {
            if ($step[0] === self::EXPECT) {
                $expectation = $step[1];
                $timeout     = $step[2];
                $this->waitForExpectedResponse($expectation, $timeout);
            } else {
                $input = $step[1];
                $this->sendInput($input);
            }
        }

        $this->closeProcess();
    }
public function run()
    {
        $this->createProcess();

        foreach ($this->steps as $step) {
            if ($step[0] === self::EXPECT) {
                $expectation = $step[1];
                $timeout     = $step[2];
                $this->waitForExpectedResponse($expectation, $timeout);
            } else {
                $input = $step[1];
                $this->sendInput($input);
            }
        }

        $this->closeProcess();
    }
public function run ( ) { $ this -> createProcess ( ) ; foreach ( $ this -> steps as $ step ) { if ( $ step [ 0 ] === self :: EXPECT ) { $ expectation = $ step [ 1 ] ; $ timeout = $ step [ 2 ] ; $ this -> waitForExpectedResponse ( $ expectation , $ timeout ) ; } else { $ input = $ step [ 1 ] ; $ this -> sendInput ( $ input ) ; } } $ this -> closeProcess ( ) ; }
Run the process and execute the registered steps.
The program will block until the steps are completed or a timeout occurs.

@return null

@throws \RuntimeException If the process can not be created.
@throws \Yuloh\Expect\Exceptions\ProcessTimeoutException    if the process times out.
@throws \Yuloh\Expect\Exceptions\UnexpectedEOFException     if an unexpected EOF is found.
@throws \Yuloh\Expect\Exceptions\ProcessTerminatedException if the process is terminated
before the expectation is met.
Run the process and execute the registered steps . The program will block until the steps are completed or a timeout occurs .