Clinner\Command\Callback::getOutput PHP Method

getOutput() public method

This method will only return a valid value after the command has been executed.
public getOutput ( ) : string
return string
    public function getOutput()
    {
        return $this->_output;
    }

Usage Example

Example #1
0
 /**
  * @depends testRun
  */
 public function testGetOutput()
 {
     $closure = function () {
         echo 'Some nifty output';
     };
     $callback = new Callback($closure);
     // Output must be null before the command is run
     $this->assertNull($callback->getOutput());
     $callback->run();
     // Output must be a string after the command is run with the given $closure
     $this->assertEquals('Some nifty output', $callback->getOutput());
 }