File tree 2 files changed +24
-10
lines changed
src/Symfony/Component/Process 2 files changed +24
-10
lines changed Original file line number Diff line number Diff line change @@ -55,16 +55,9 @@ public function setPhpBinary($php)
55
55
}
56
56
57
57
/**
58
- * Runs the process.
59
- *
60
- * @param Closure|string|array $callback A PHP callback to run whenever there is some
61
- * output available on STDOUT or STDERR
62
- *
63
- * @return integer The exit status code
64
- *
65
- * @api
58
+ * {@inheritdoc}
66
59
*/
67
- public function run ($ callback = null )
60
+ public function start ($ callback = null )
68
61
{
69
62
if (null === $ this ->getCommandLine ()) {
70
63
if (false === $ php = $ this ->executableFinder ->find ()) {
@@ -73,6 +66,6 @@ public function run($callback = null)
73
66
$ this ->setCommandLine ($ php );
74
67
}
75
68
76
- return parent ::run ($ callback );
69
+ return parent ::start ($ callback );
77
70
}
78
71
}
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Symfony \Component \Process \Tests ;
4
+
5
+ use Symfony \Component \Process \PhpProcess ;
6
+
7
+ class PhpProcessTest extends \PHPUnit_Framework_TestCase
8
+ {
9
+
10
+ public function testNonBlockingWorks ()
11
+ {
12
+ $ expected = 'hello world! ' ;
13
+ $ process = new PhpProcess (<<<PHP
14
+ <?php echo ' $ expected';
15
+ PHP
16
+ );
17
+ $ process ->start ();
18
+ $ process ->wait ();
19
+ $ this ->assertEquals ($ expected , $ process ->getOutput ());
20
+ }
21
+ }
You can’t perform that action at this time.
0 commit comments