Skip to content

Commit 387f0c1

Browse files
committed
OS emulation methods added.
1 parent 20ba0ec commit 387f0c1

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/HelperFunctions/TestCase.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,18 @@ protected function setUp()
2020
self::$functions = mock();
2121
}
2222

23+
protected function emulateLinuxOs()
24+
{
25+
self::$functions->expects()->php_uname()
26+
->andReturns('Linux localhost 2.4.21-0.13mdk #1 Fri Mar 14 15:08:06 EST 2003 i686');
27+
}
28+
29+
protected function emulateWindowsOs()
30+
{
31+
self::$functions->expects()->php_uname()
32+
->andReturns('Windows NT XN1 5.1 build 2600');
33+
}
34+
2335
protected function expectsExecWith($command)
2436
{
2537
self::$functions->expects()->exec($command);

0 commit comments

Comments
 (0)