Permalink
Browse files

[Process][Tests] Prove process fail (Add more test case)

  • Loading branch information...
lyrixx committed Sep 25, 2012
1 parent 598dcf3 commit 7a955c0e4b4effa72bdcf8b1950683722b4e4acd
Showing with 15 additions and 3 deletions.
  1. +15 −3 src/Symfony/Component/Process/Tests/AbstractProcessTest.php
@@ -76,15 +76,27 @@ public function testProcessPipes($expected, $code)
$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()

0 comments on commit 7a955c0

Please sign in to comment.