18 public function testRender($expectedCommand, $actualCommand, $testArguments)
23 $commandRenderer->render($actualCommand, $testArguments)
32 $testArgument =
'argument';
33 $testArgument2 =
'argument2';
35 $expectedCommand =
"php -r %s 2>&1 | grep %s 2>&1";
36 $expectedCommandArgs =
"php -r '" . $testArgument .
"' 2>&1 | grep '" . $testArgument2 .
"' 2>&1";
39 [$expectedCommand,
'php -r %s | grep %s', []],
40 [$expectedCommand,
'php -r %s 2>&1 | grep %s', []],
41 [$expectedCommand,
'php -r %s 2>&1 2>&1 | grep %s', []],
42 [$expectedCommandArgs,
'php -r %s | grep %s', [$testArgument, $testArgument2]],
43 [$expectedCommandArgs,
'php -r %s 2>&1 | grep %s', [$testArgument, $testArgument2]],
44 [$expectedCommandArgs,
'php -r %s 2>&1 2>&1 | grep %s', [$testArgument, $testArgument2]],
testRender($expectedCommand, $actualCommand, $testArguments)