File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,34 @@ public function run_in_background_supports_before_and_after_commands_both()
8080 $ command ->runInBackground ();
8181 }
8282
83+ /**
84+ * @test
85+ * @runInSeparateProcess
86+ * @preserveGlobalState disabled
87+ */
88+ public function it_adds_php_option_for_hhvm ()
89+ {
90+ $ this ->shouldRecieveExecCallOnceWith ('(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+ /**
98+ * @test
99+ * @runInSeparateProcess
100+ * @preserveGlobalState disabled
101+ */
102+ public function it_supports_overriding_of_artisan_binary_through_constant ()
103+ {
104+ $ this ->shouldRecieveExecCallOnceWith ('(before && php custom-artisan test:command && after) > /dev/null 2>&1 & ' );
105+
106+ define ('ARTISAN_BINARY ' , 'custom-artisan ' );
107+ $ command = Command::factory ('test:command ' , 'before ' , 'after ' );
108+ $ command ->runInBackground ();
109+ }
110+
83111 private function shouldRecieveExecCallOnceWith ($ with )
84112 {
85113 self ::$ functions ->shouldReceive ('exec ' )->with ($ with )->once ();
You can’t perform that action at this time.
0 commit comments