Browse Source

More DS corrections.

euromark 11 years ago
parent
commit
e413accd49

+ 1 - 1
tests/TestCase/Console/ShellTest.php

@@ -481,7 +481,7 @@ class ShellTest extends TestCase {
  * @return void
  * @return void
  */
  */
 	public function testCreateFileNoPermissions() {
 	public function testCreateFileNoPermissions() {
-		$this->skipIf(DIRECTORY_SEPARATOR === '\\', 'Cant perform operations using permissions on windows.');
+		$this->skipIf(DS === '\\', 'Cant perform operations using permissions on windows.');
 
 
 		$path = TMP . 'shell_test';
 		$path = TMP . 'shell_test';
 		$file = $path . DS . 'no_perms';
 		$file = $path . DS . 'no_perms';

+ 1 - 1
tests/TestCase/Filesystem/FileTest.php

@@ -128,7 +128,7 @@ class FileTest extends TestCase {
  * @return void
  * @return void
  */
  */
 	public function testPermission() {
 	public function testPermission() {
-		$this->skipIf(DIRECTORY_SEPARATOR === '\\', 'File permissions tests not supported on Windows.');
+		$this->skipIf(DS === '\\', 'File permissions tests not supported on Windows.');
 
 
 		$dir = TMP . 'tests' . DS . 'permissions' . DS;
 		$dir = TMP . 'tests' . DS . 'permissions' . DS;
 		$old = umask();
 		$old = umask();

+ 2 - 2
tests/TestCase/Filesystem/FolderTest.php

@@ -172,7 +172,7 @@ class FolderTest extends TestCase {
  * @return void
  * @return void
  */
  */
 	public function testRecursiveCreateFailure() {
 	public function testRecursiveCreateFailure() {
-		$this->skipIf(DIRECTORY_SEPARATOR === '\\', 'Cant perform operations using permissions on windows.');
+		$this->skipIf(DS === '\\', 'Cant perform operations using permissions on windows.');
 
 
 		$path = TMP . 'tests/one';
 		$path = TMP . 'tests/one';
 		mkdir($path, 0777, true);
 		mkdir($path, 0777, true);
@@ -267,7 +267,7 @@ class FolderTest extends TestCase {
  * @return void
  * @return void
  */
  */
 	public function testChmod() {
 	public function testChmod() {
-		$this->skipIf(DIRECTORY_SEPARATOR === '\\', 'Folder permissions tests not supported on Windows.');
+		$this->skipIf(DS === '\\', 'Folder permissions tests not supported on Windows.');
 
 
 		$path = TMP . 'tests/';
 		$path = TMP . 'tests/';
 		$Folder = new Folder($path);
 		$Folder = new Folder($path);

+ 3 - 3
tests/TestCase/Shell/PluginAssetsShellTest.php

@@ -36,7 +36,7 @@ class PluginAssetsShellTest extends TestCase {
 		parent::setUp();
 		parent::setUp();
 
 
 		$this->skipIf(
 		$this->skipIf(
-			DIRECTORY_SEPARATOR === '\\',
+			DS === '\\',
 			'Skip PluginAssetsShell tests on windows to prevent side effects for UrlHelper tests on AppVeyor.'
 			'Skip PluginAssetsShell tests on windows to prevent side effects for UrlHelper tests on AppVeyor.'
 		);
 		);
 
 
@@ -74,7 +74,7 @@ class PluginAssetsShellTest extends TestCase {
 		$path = WWW_ROOT . 'test_plugin';
 		$path = WWW_ROOT . 'test_plugin';
 		$link = new \SplFileInfo($path);
 		$link = new \SplFileInfo($path);
 		$this->assertTrue(file_exists($path . DS . 'root.js'));
 		$this->assertTrue(file_exists($path . DS . 'root.js'));
-		if (DIRECTORY_SEPARATOR === '\\') {
+		if (DS === '\\') {
 			$this->assertTrue($link->isDir());
 			$this->assertTrue($link->isDir());
 			$folder = new Folder($path);
 			$folder = new Folder($path);
 			$folder->delete();
 			$folder->delete();
@@ -107,7 +107,7 @@ class PluginAssetsShellTest extends TestCase {
 		$this->shell->symlink();
 		$this->shell->symlink();
 		$path = WWW_ROOT . 'company' . DS . 'test_plugin_three';
 		$path = WWW_ROOT . 'company' . DS . 'test_plugin_three';
 		$link = new \SplFileInfo($path);
 		$link = new \SplFileInfo($path);
-		if (DIRECTORY_SEPARATOR === '\\') {
+		if (DS === '\\') {
 			$this->assertTrue($link->isDir());
 			$this->assertTrue($link->isDir());
 		} else {
 		} else {
 			$this->assertTrue($link->isLink());
 			$this->assertTrue($link->isLink());