Skip to content

Commit 4bcbd39

Browse files
committed
Windows emulation test for call_in_background added.
1 parent 66a4117 commit 4bcbd39

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

tests/HelperFunctions/classes/Artisan/CommandTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,18 @@ public function it_can_run_command_in_background()
4141
$command->runInBackground();
4242
}
4343

44+
/** @test */
45+
public function which_also_works_for_windows()
46+
{
47+
require_once 'mocks.php';
48+
49+
$this->emulateWindowsOs();
50+
$this->expectsExecWith('start /B php artisan test:command');
51+
52+
$command = Command::factory('test:command');
53+
$command->runInBackground();
54+
}
55+
4456
/**
4557
* @test
4658
* @runInSeparateProcess
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
namespace Illuminated\Helpers\System
4+
{
5+
use Illuminated\Helpers\HelperFunctions\Tests\TestCase;
6+
7+
if (!function_exists(__NAMESPACE__ . '\php_uname')) {
8+
function php_uname()
9+
{
10+
return TestCase::$functions->php_uname();
11+
}
12+
}
13+
}

0 commit comments

Comments
 (0)