public function testExecutionResult() { $cmd = new Command('echo "Some Command"'); try { $cmd->getExecutionResult(); $this->fail("Exception is not raised"); } catch (\Exception $e) { } $cmd->run(); $this->assertEquals($cmd->getExecutionResult()->getStdout(), "Some Command"); $this->assertEquals($cmd->getExecutionResult()->getStderr(), ''); $this->assertEquals($cmd->getExecutionResult()->getExitCode(), 0); }