diff --git a/PHPCI/Builder.php b/PHPCI/Builder.php index ccb78c6b..69db31e1 100644 --- a/PHPCI/Builder.php +++ b/PHPCI/Builder.php @@ -242,7 +242,7 @@ class Builder implements LoggerAwareInterface */ public function executeCommand() { - return $this->commandExecutor->buildAndExecuteCommand(func_get_args()); + return $this->commandExecutor->executeCommand(func_get_args()); } /** diff --git a/PHPCI/Helper/CommandExecutor.php b/PHPCI/Helper/CommandExecutor.php index dc284b6a..438829af 100644 --- a/PHPCI/Helper/CommandExecutor.php +++ b/PHPCI/Helper/CommandExecutor.php @@ -51,22 +51,12 @@ class CommandExecutor $this->rootDir = $rootDir; } - /** - * Executes shell commands. Accepts multiple arguments the first - * is the template and everything else is inserted in. c.f. sprintf - * @return bool Indicates success - */ - public function executeCommand() - { - return $this->buildAndExecuteCommand(func_get_args()); - } - /** * Executes shell commands. * @param array $args * @return bool Indicates success */ - public function buildAndExecuteCommand($args = array()) + public function executeCommand($args = array()) { $this->lastOutput = array(); diff --git a/Tests/PHPCI/Helper/CommandExecutorTest.php b/Tests/PHPCI/Helper/CommandExecutorTest.php index 4925e639..ae6809d5 100644 --- a/Tests/PHPCI/Helper/CommandExecutorTest.php +++ b/Tests/PHPCI/Helper/CommandExecutorTest.php @@ -21,28 +21,28 @@ class CommandExecutorTest extends ProphecyTestCase public function testGetLastOutput_ReturnsOutputOfCommand() { - $this->testedExecutor->buildAndExecuteCommand(array('echo "%s"', 'Hello World')); + $this->testedExecutor->executeCommand(array('echo "%s"', 'Hello World')); $output = $this->testedExecutor->getLastOutput(); $this->assertEquals("Hello World", $output); } public function testGetLastOutput_ForgetsPreviousCommandOutput() { - $this->testedExecutor->buildAndExecuteCommand(array('echo "%s"', 'Hello World')); - $this->testedExecutor->buildAndExecuteCommand(array('echo "%s"', 'Hello Tester')); + $this->testedExecutor->executeCommand(array('echo "%s"', 'Hello World')); + $this->testedExecutor->executeCommand(array('echo "%s"', 'Hello Tester')); $output = $this->testedExecutor->getLastOutput(); $this->assertEquals("Hello Tester", $output); } public function testExecuteCommand_ReturnsTrueForValidCommands() { - $returnValue = $this->testedExecutor->buildAndExecuteCommand(array('echo "%s"', 'Hello World')); + $returnValue = $this->testedExecutor->executeCommand(array('echo "%s"', 'Hello World')); $this->assertTrue($returnValue); } public function testExecuteCommand_ReturnsFalseForInvalidCommands() { - $returnValue = $this->testedExecutor->buildAndExecuteCommand(array('eerfdcvcho "%s" > /dev/null 2>&1', 'Hello World')); + $returnValue = $this->testedExecutor->executeCommand(array('eerfdcvcho "%s" > /dev/null 2>&1', 'Hello World')); $this->assertFalse($returnValue); } diff --git a/composer.json b/composer.json index 6cb24ba1..fdb4bc28 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ }, "require": { - "php": ">=5.3.3", + "php": ">=5.3.8", "ext-mcrypt": "*", "ext-pdo": "*", "ext-pdo_mysql": "*", diff --git a/composer.lock b/composer.lock index d8f78d4c..1e6302c3 100644 --- a/composer.lock +++ b/composer.lock @@ -3,7 +3,7 @@ "This file locks the dependencies of your project to a known state", "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file" ], - "hash": "0692857385ac27090b3000cbc680ced8", + "hash": "07244b4e81274ba07fdb9f0166c73678", "packages": [ { "name": "block8/b8framework", @@ -885,7 +885,7 @@ ], "platform": { - "php": ">=5.3.3", + "php": ">=5.3.8", "ext-mcrypt": "*", "ext-pdo": "*", "ext-pdo_mysql": "*"