Skip to content

Commit

Permalink
Check only for the command string in the output
Browse files Browse the repository at this point in the history
  • Loading branch information
1ed committed Jul 5, 2020
1 parent 2ca14d4 commit 2237f98
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spec/Process/ProcessBuilderSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use GrumPHP\Process\ProcessBuilder;
use PhpSpec\Exception\Example\FailureException;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
use Symfony\Component\Process\Process;

class ProcessBuilderSpec extends ObjectBehavior
Expand Down Expand Up @@ -73,7 +74,7 @@ function it_outputs_the_command_when_run_very_very_verbose(IOInterface $io)
$io->isVeryVerbose()->willReturn(true);

$command = '/usr/bin/grumphp';
$io->write([PHP_EOL . sprintf('Command: %1$s%2$s%1$s', '\\' === DIRECTORY_SEPARATOR ? '"' : "'", $command)], true)->shouldBeCalled();
$io->write(Argument::withEveryEntry(Argument::containingString($command)), true)->shouldBeCalled();

$arguments = new ProcessArgumentsCollection([$command]);
$this->buildProcess($arguments);
Expand Down

0 comments on commit 2237f98

Please sign in to comment.