Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merged branch cup-of-giraf/phpprocess_allow_non_blocking (PR #6411)
This PR was squashed before being merged into the 2.1 branch (closes #6411). Commits ------- 2cd43da [Process] Allow non-blocking start with PhpProcess Discussion ---------- [Process] Allow non-blocking start with PhpProcess Bug fix: yes Feature addition: no Backwards compatibility break: no Symfony2 tests pass: yes Fixes the following tickets: #6410 Todo: - License of the code: MIT Documentation PR: -
- Loading branch information
Showing
2 changed files
with
24 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
namespace Symfony\Component\Process\Tests; | ||
|
||
use Symfony\Component\Process\PhpProcess; | ||
|
||
class PhpProcessTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
|
||
public function testNonBlockingWorks() | ||
{ | ||
$expected = 'hello world!'; | ||
$process = new PhpProcess(<<<PHP | ||
<?php echo '$expected'; | ||
PHP | ||
); | ||
$process->start(); | ||
$process->wait(); | ||
$this->assertEquals($expected, $process->getOutput()); | ||
} | ||
} |