[Process][Tests] Prove process fail (Add more test case)
This commit is contained in:
parent
598dcf3c57
commit
7a955c0e4b
@ -76,15 +76,27 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertSame($expected, $p->getErrorOutput());
|
||||
}
|
||||
|
||||
public function testProcessOutput()
|
||||
public function chainedCommandsOutputProvider()
|
||||
{
|
||||
return array(
|
||||
array('11', ';', '1'),
|
||||
array('22', '&&', '2'),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @dataProvider chainedCommandsOutputProvider
|
||||
*/
|
||||
public function testChainedCommandsOutput($expected, $operator, $input)
|
||||
{
|
||||
if (defined('PHP_WINDOWS_VERSION_BUILD')) {
|
||||
$this->markTestSkipped('Does it work on windows ?');
|
||||
}
|
||||
|
||||
$process = $this->getProcess("echo -n 1 ; echo -n 1");
|
||||
$process = $this->getProcess(sprintf('echo -n %s %s echo -n %s', $input, $operator, $input));
|
||||
$process->run();
|
||||
$this->assertEquals('11', $process->getOutput());
|
||||
$this->assertEquals($expected, $process->getOutput());
|
||||
}
|
||||
|
||||
public function testCallbackIsExecutedForOutput()
|
||||
|
Reference in New Issue
Block a user