File tree Expand file tree Collapse file tree 2 files changed +3
-35
lines changed Expand file tree Collapse file tree 2 files changed +3
-35
lines changed Original file line number Diff line number Diff line change 33namespace Illuminated \Helpers \Artisan ;
44
55use Symfony \Component \Process \PhpExecutableFinder ;
6- use Symfony \Component \Process \ProcessUtils ;
76
87class Command
98{
@@ -53,23 +52,11 @@ protected function composeForRun()
5352 protected function getPhpBinary ()
5453 {
5554 $ finder = new PhpExecutableFinder ();
56- $ phpBinary = $ finder ->find (false );
57-
58- $ phpBinary = ProcessUtils::escapeArgument ($ phpBinary );
59- if (defined ('HHVM_VERSION ' )) {
60- $ phpBinary .= ' --php ' ;
61- }
62-
63- return $ phpBinary ;
55+ return $ finder ->find ();
6456 }
6557
6658 protected function getArtisan ()
6759 {
68- $ artisan = 'artisan ' ;
69- if (defined ('ARTISAN_BINARY ' )) {
70- $ artisan = ProcessUtils::escapeArgument (ARTISAN_BINARY );
71- }
72-
73- return $ artisan ;
60+ return defined ('ARTISAN_BINARY ' ) ? ARTISAN_BINARY : 'artisan ' ;
7461 }
7562}
Original file line number Diff line number Diff line change @@ -15,12 +15,7 @@ protected function setUp()
1515 self ::$ functions = Mockery::mock ();
1616
1717 $ phpBinaryMock = Mockery::mock ('overload:Symfony\Component\Process\PhpExecutableFinder ' );
18- $ phpBinaryMock ->shouldReceive ('find ' )->with (false )->zeroOrMoreTimes ()->andReturn ('php ' );
19-
20- $ utilsMock = Mockery::mock ('alias:Symfony\Component\Process\ProcessUtils ' );
21- $ utilsMock ->shouldReceive ('escapeArgument ' )->withAnyArgs ()->zeroOrMoreTimes ()->andReturnUsing (function ($ value ) {
22- return $ value ;
23- });
18+ $ phpBinaryMock ->shouldReceive ('find ' )->withNoArgs ()->zeroOrMoreTimes ()->andReturn ('php ' );
2419 }
2520
2621 /** @test */
@@ -80,20 +75,6 @@ public function run_in_background_supports_before_and_after_subcommands_together
8075 $ command ->runInBackground ();
8176 }
8277
83- /**
84- * @test
85- * @runInSeparateProcess
86- * @preserveGlobalState disabled
87- */
88- public function it_adds_php_option_for_hhvm ()
89- {
90- $ this ->shouldReceiveExecCallOnceWith ('(before && php --php artisan test:command && after) > /dev/null 2>&1 & ' );
91-
92- define ('HHVM_VERSION ' , true );
93- $ command = Command::factory ('test:command ' , 'before ' , 'after ' );
94- $ command ->runInBackground ();
95- }
96-
9778 /**
9879 * @test
9980 * @runInSeparateProcess
You can’t perform that action at this time.
0 commit comments