add return value tests for CommandExecutor.

This commit is contained in:
steve.brazier 2013-12-12 16:04:07 +00:00
parent 7a5aa5814f
commit 1307240622

View file

@ -33,4 +33,16 @@ class CommandExecutorTest extends ProphecyTestCase
$output = $this->testedExecutor->getLastOutput();
$this->assertEquals("Hello Tester", $output);
}
public function testExecuteCommand_ReturnsTrueForValidCommands()
{
$returnValue = $this->testedExecutor->executeCommand(array('echo "%s"', 'Hello World'));
$this->assertTrue($returnValue);
}
public function testExecuteCommand_ReturnsFalseForInvalidCommands()
{
$returnValue = $this->testedExecutor->executeCommand(array('eerfdcvcho "%s"', 'Hello World'));
$this->assertFalse($returnValue);
}
}