Browse Source

Try to fix test on windows.

ADmad 11 years ago
parent
commit
d722201158
1 changed files with 8 additions and 2 deletions
  1. 8 2
      tests/TestCase/Shell/PluginAssetsShellTest.php

+ 8 - 2
tests/TestCase/Shell/PluginAssetsShellTest.php

@@ -67,9 +67,15 @@ class PluginAssetsShellTest extends TestCase {
 
 		$path = WWW_ROOT . 'test_plugin';
 		$link = new \SplFileInfo($path);
-		$this->assertTrue($link->isLink());
 		$this->assertTrue(file_exists($path . DS . 'root.js'));
-		unlink($path);
+		if (DIRECTORY_SEPARATOR === '\\') {
+			$this->assertTrue($link->isDir());
+			$folder = new Folder($path);
+			$folder->delete();
+		} else {
+			$this->assertTrue($link->isLink());
+			unlink($path);
+		}
 
 		$path = WWW_ROOT . 'company' . DS . 'test_plugin_three';
 		$link = new \SplFileInfo($path);