+ /**
+ * @requires PHP 5.4
+ */
+ public function testFindBatchExecutableOnWindows()
+ {
+ if (ini_get('open_basedir')) {
+ $this->markTestSkipped('Cannot test when open_basedir is set');
+ }
+ if ('\\' !== \DIRECTORY_SEPARATOR) {
+ $this->markTestSkipped('Can be only tested on windows');
+ }
+
+ $target = tempnam(sys_get_temp_dir(), 'example-windows-executable');
+
+ touch($target);
+ touch($target.'.BAT');
+
+ $this->assertFalse(is_executable($target));
+
+ $this->setPath(sys_get_temp_dir());
+
+ $finder = new ExecutableFinder();
+ $result = $finder->find(basename($target), false);
+
+ unlink($target);
+ unlink($target.'.BAT');
+
+ $this->assertSamePath($target.'.BAT', $result);
+ }
+