-
Notifications
You must be signed in to change notification settings - Fork 430
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make it easier to configure new tasks
- Loading branch information
Showing
39 changed files
with
440 additions
and
394 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
|
||
namespace spec\GrumPHP\Process; | ||
|
||
use GrumPHP\Collection\ProcessArgumentsCollection; | ||
use GrumPHP\Locator\ExternalCommand; | ||
use PhpSpec\ObjectBehavior; | ||
use Prophecy\Argument; | ||
|
||
class ProcessBuilderSpec extends ObjectBehavior | ||
{ | ||
function let(ExternalCommand $externalCommandLocator) | ||
{ | ||
$this->beConstructedWith($externalCommandLocator); | ||
} | ||
|
||
function it_is_initializable() | ||
{ | ||
$this->shouldHaveType('GrumPHP\Process\ProcessBuilder'); | ||
} | ||
|
||
function it_should_be_able_to_create_process_arguments_based_on_taskname(ExternalCommand $externalCommandLocator) | ||
{ | ||
$externalCommandLocator->locate('grumphp')->willReturn('/usr/bin/grumphp'); | ||
|
||
$arguments = $this->createArgumentsForCommand('grumphp'); | ||
$arguments->shouldHaveType('GrumPHP\Collection\ProcessArgumentsCollection'); | ||
$arguments[0]->shouldBe('/usr/bin/grumphp'); | ||
$arguments->count()->shouldBe(1); | ||
} | ||
|
||
function it_should_build_process_based_on_process_arguments() | ||
{ | ||
$arguments = new ProcessArgumentsCollection(array('/usr/bin/grumphp')); | ||
$process = $this->buildProcess($arguments); | ||
|
||
$process->shouldHaveType('Symfony\Component\Process\Process'); | ||
$process->getCommandLine()->shouldBe("'/usr/bin/grumphp'"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.