@@ -29,8 +29,8 @@ public function testLogs()
2929 public function testExecuteBasic ()
3030 {
3131 $ output = '' ;
32- $ stdin = '' ;
33- $ code = Console::execute ('php -r "echo \'hello world \';" ' , $ stdin , $ output , 10 );
32+ $ input = '' ;
33+ $ code = Console::execute ('php -r "echo \'hello world \';" ' , $ input , $ output , 10 );
3434
3535 $ this ->assertEquals ('hello world ' , $ output );
3636 $ this ->assertEquals (0 , $ code );
@@ -39,10 +39,10 @@ public function testExecuteBasic()
3939 public function testExecuteStream ()
4040 {
4141 $ output = '' ;
42- $ stdin = '' ;
42+ $ input = '' ;
4343
4444 $ outputStream = '' ;
45- $ code = Console::execute ('printf 1 && sleep 1 && printf 2 && sleep 1 && printf 3 && sleep 1 && printf 4 && sleep 1 && printf 5 ' , $ stdin , $ output , 10 , function ($ output ) use (&$ outputStream ) {
45+ $ code = Console::execute ('printf 1 && sleep 1 && printf 2 && sleep 1 && printf 3 && sleep 1 && printf 4 && sleep 1 && printf 5 ' , $ input , $ output , 10 , function ($ output ) use (&$ outputStream ) {
4646 $ outputStream .= $ output ;
4747 });
4848
@@ -54,8 +54,8 @@ public function testExecuteStream()
5454 public function testExecuteStdOut ()
5555 {
5656 $ output = '' ;
57- $ stdin = '' ;
58- $ code = Console::execute ('>&1 echo "success" ' , $ stdin , $ output , 3 );
57+ $ input = '' ;
58+ $ code = Console::execute ('>&1 echo "success" ' , $ input , $ output , 3 );
5959
6060 $ this ->assertEquals ("success \n" , $ output );
6161 $ this ->assertEquals (0 , $ code );
@@ -64,8 +64,8 @@ public function testExecuteStdOut()
6464 public function testExecuteStdErr ()
6565 {
6666 $ output = '' ;
67- $ stdin = '' ;
68- $ code = Console::execute ('>&2 echo "error" ' , $ stdin , $ output , 3 );
67+ $ input = '' ;
68+ $ code = Console::execute ('>&2 echo "error" ' , $ input , $ output , 3 );
6969
7070 $ this ->assertEquals ("error \n" , $ output );
7171 $ this ->assertEquals (0 , $ code );
@@ -74,15 +74,15 @@ public function testExecuteStdErr()
7474 public function testExecuteExitCode ()
7575 {
7676 $ output = '' ;
77- $ stdin = '' ;
78- $ code = Console::execute ('php -r "echo \'hello world \'; exit(2);" ' , $ stdin , $ output , 10 );
77+ $ input = '' ;
78+ $ code = Console::execute ('php -r "echo \'hello world \'; exit(2);" ' , $ input , $ output , 10 );
7979
8080 $ this ->assertEquals ('hello world ' , $ output );
8181 $ this ->assertEquals (2 , $ code );
8282
8383 $ output = '' ;
84- $ stdin = '' ;
85- $ code = Console::execute ('php -r "echo \'hello world \'; exit(100);" ' , $ stdin , $ output , 10 );
84+ $ input = '' ;
85+ $ code = Console::execute ('php -r "echo \'hello world \'; exit(100);" ' , $ input , $ output , 10 );
8686
8787 $ this ->assertEquals ('hello world ' , $ output );
8888 $ this ->assertEquals (100 , $ code );
@@ -91,15 +91,15 @@ public function testExecuteExitCode()
9191 public function testExecuteTimeout ()
9292 {
9393 $ output = '' ;
94- $ stdin = '' ;
95- $ code = Console::execute ('php -r "sleep(1); echo \'hello world \'; exit(0);" ' , $ stdin , $ output , 3 );
94+ $ input = '' ;
95+ $ code = Console::execute ('php -r "sleep(1); echo \'hello world \'; exit(0);" ' , $ input , $ output , 3 );
9696
9797 $ this ->assertEquals ('hello world ' , $ output );
9898 $ this ->assertEquals (0 , $ code );
9999
100100 $ output = '' ;
101- $ stdin = '' ;
102- $ code = Console::execute ('php -r "sleep(4); echo \'hello world \'; exit(0);" ' , $ stdin , $ output , 3 );
101+ $ input = '' ;
102+ $ code = Console::execute ('php -r "sleep(4); echo \'hello world \'; exit(0);" ' , $ input , $ output , 3 );
103103
104104 $ this ->assertEquals ('' , $ output );
105105 $ this ->assertEquals (1 , $ code );
@@ -108,9 +108,9 @@ public function testExecuteTimeout()
108108 public function testLoop ()
109109 {
110110 $ file = __DIR__ .'/../resources/loop.php ' ;
111- $ stdin = '' ;
111+ $ input = '' ;
112112 $ output = '' ;
113- $ code = Console::execute ('php ' .$ file , $ stdin , $ output , 30 );
113+ $ code = Console::execute ('php ' .$ file , $ input , $ output , 30 );
114114
115115 $ this ->assertGreaterThan (30 , count (explode ("\n" , $ output )));
116116 $ this ->assertLessThan (50 , count (explode ("\n" , $ output )));
0 commit comments