Skip to content

Commit 66a4117

Browse files
committed
Run in background tests made in separate processes.
1 parent 5e0d56d commit 66a4117

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

tests/HelperFunctions/classes/Artisan/CommandTest.php

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ public function it_has_static_constructor_named_factory()
2828
$this->assertInstanceOf(Command::class, $command);
2929
}
3030

31-
/** @test */
31+
/**
32+
* @test
33+
* @runInSeparateProcess
34+
* @preserveGlobalState disabled
35+
*/
3236
public function it_can_run_command_in_background()
3337
{
3438
$this->expectsExecWith('(php artisan test:command) > /dev/null 2>&1 &');
@@ -37,7 +41,11 @@ public function it_can_run_command_in_background()
3741
$command->runInBackground();
3842
}
3943

40-
/** @test */
44+
/**
45+
* @test
46+
* @runInSeparateProcess
47+
* @preserveGlobalState disabled
48+
*/
4149
public function run_in_background_supports_before_subcommand()
4250
{
4351
$this->expectsExecWith('(before command && php artisan test:command) > /dev/null 2>&1 &');
@@ -46,7 +54,11 @@ public function run_in_background_supports_before_subcommand()
4654
$command->runInBackground();
4755
}
4856

49-
/** @test */
57+
/**
58+
* @test
59+
* @runInSeparateProcess
60+
* @preserveGlobalState disabled
61+
*/
5062
public function run_in_background_supports_after_subcommand()
5163
{
5264
$this->expectsExecWith('(php artisan test:command && after command) > /dev/null 2>&1 &');
@@ -55,7 +67,11 @@ public function run_in_background_supports_after_subcommand()
5567
$command->runInBackground();
5668
}
5769

58-
/** @test */
70+
/**
71+
* @test
72+
* @runInSeparateProcess
73+
* @preserveGlobalState disabled
74+
*/
5975
public function run_in_background_supports_before_and_after_subcommands_together()
6076
{
6177
$this->expectsExecWith('(before && php artisan test:command && after) > /dev/null 2>&1 &');

0 commit comments

Comments
 (0)