/** * @requires OS netware */ public function testIsNetware() { $this->assertTrue(OperatingSystem::isNetware()); $this->assertFalse(OperatingSystem::isLinux()); $this->assertFalse(OperatingSystem::isWindows()); $this->assertFalse(OperatingSystem::isMacOs()); }
/** * @test * * @param string $name * @param bool $expected * @dataProvider provideExecutableNames */ public function isExecutableName($name, $expected) { if (!OperatingSystem::isWindows()) { $this->markTestSkipped('Only tested on windows'); } $this->assertSame($expected, WindowsSystem::isExecutableName($name), $name); }
/** * get current working directory */ public static function getCwd() { if (!Exec::allowed() || OperatingSystem::isWindows()) { return getcwd(); } Exec::run('pwd', $folder); return $folder; }