Skip to content

Commit 5e0d56d

Browse files
committed
is_windows_os helper function tests added.
1 parent 387f0c1 commit 5e0d56d

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
3+
namespace Illuminated\Helpers\System;
4+
5+
use Illuminated\Helpers\HelperFunctions\Tests\TestCase;
6+
7+
class IsWindowsOsTest extends TestCase
8+
{
9+
/** @test */
10+
public function it_returns_false_on_non_windows_os()
11+
{
12+
$this->emulateLinuxOs();
13+
14+
$this->assertFalse(is_windows_os());
15+
}
16+
17+
/** @test */
18+
public function it_returns_true_on_windows_os()
19+
{
20+
$this->emulateWindowsOs();
21+
22+
$this->assertTrue(is_windows_os());
23+
}
24+
}
25+
26+
if (!function_exists(__NAMESPACE__ . '\php_uname')) {
27+
function php_uname()
28+
{
29+
return TestCase::$functions->php_uname();
30+
}
31+
}

0 commit comments

Comments
 (0)