GrumPHP\Process\ProcessBuilder::createArgumentsForCommand PHP Method

createArgumentsForCommand() public method

public createArgumentsForCommand ( string $command ) : ProcessArgumentsCollection
$command string
return GrumPHP\Collection\ProcessArgumentsCollection
    public function createArgumentsForCommand($command)
    {
        $executable = $this->getCommandLocation($command);
        return ProcessArgumentsCollection::forExecutable($executable);
    }

Usage Example

Example #1
0
 function it_lists_files_with_merge_conflicts(ProcessBuilder $processBuilder, ContextInterface $context, Process $process)
 {
     $arguments = new ProcessArgumentsCollection();
     $processBuilder->createArgumentsForCommand('git')->willReturn($arguments);
     $processBuilder->buildProcess($arguments)->willReturn($process);
     $context->getFiles()->willReturn(new FilesCollection([new SplFileInfo('file1.php', '.', 'file1.php')]));
     $result = $this->run($context);
     $result->shouldBeAnInstanceOf(TaskResultInterface::class);
     $result->isPassed()->shouldBe(true);
 }
All Usage Examples Of GrumPHP\Process\ProcessBuilder::createArgumentsForCommand