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 3
3
namespace Illuminated \Helpers \Artisan ;
4
4
5
5
use Symfony \Component \Process \PhpExecutableFinder ;
6
- use Symfony \Component \Process \ProcessUtils ;
7
6
8
7
class Command
9
8
{
@@ -53,23 +52,11 @@ protected function composeForRun()
53
52
protected function getPhpBinary ()
54
53
{
55
54
$ 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 ();
64
56
}
65
57
66
58
protected function getArtisan ()
67
59
{
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 ' ;
74
61
}
75
62
}
Original file line number Diff line number Diff line change @@ -15,12 +15,7 @@ protected function setUp()
15
15
self ::$ functions = Mockery::mock ();
16
16
17
17
$ 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 ' );
24
19
}
25
20
26
21
/** @test */
@@ -80,20 +75,6 @@ public function run_in_background_supports_before_and_after_subcommands_together
80
75
$ command ->runInBackground ();
81
76
}
82
77
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
-
97
78
/**
98
79
* @test
99
80
* @runInSeparateProcess
You can’t perform that action at this time.
0 commit comments