public function ProcessHelperTest::testPassedCallbackIsExecuted in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/console/Tests/Helper/ProcessHelperTest.php \Symfony\Component\Console\Tests\Helper\ProcessHelperTest::testPassedCallbackIsExecuted()
File
- vendor/
symfony/ console/ Tests/ Helper/ ProcessHelperTest.php, line 34
Class
Namespace
Symfony\Component\Console\Tests\HelperCode
public function testPassedCallbackIsExecuted() {
$helper = new ProcessHelper();
$helper
->setHelperSet(new HelperSet(array(
new DebugFormatterHelper(),
)));
$output = $this
->getOutputStream(StreamOutput::VERBOSITY_NORMAL);
$executed = false;
$callback = function () use (&$executed) {
$executed = true;
};
$helper
->run($output, 'php -r "echo 42;"', null, $callback);
$this
->assertTrue($executed);
}