Skip to content
Browse files

Fix failing tests

  • Loading branch information...
1 parent 8efc641 commit ce9ad1f2edf64b3c2cfd920543b519a21cefbf56 @ADmad ADmad committed
Showing with 7 additions and 4 deletions.
  1. +7 −4 lib/Cake/Test/Case/Utility/FolderTest.php
View
11 lib/Cake/Test/Case/Utility/FolderTest.php
@@ -778,7 +778,9 @@ public function testReset() {
mkdir($folder);
$file = $folder . DS . 'file';
touch($file);
- $handle = fopen($file, 'a');
+
+ chmod($folder, 0555);
+ chmod($file, 0444);
$Folder = new Folder($folder);
$return = $Folder->delete();
@@ -787,7 +789,7 @@ public function testReset() {
$messages = $Folder->messages();
$errors = $Folder->errors();
$expected = array(
- $folder . DS . 'file NOT removed',
+ $file . ' NOT removed',
$folder . ' NOT removed',
);
sort($expected);
@@ -795,7 +797,8 @@ public function testReset() {
$this->assertEmpty($messages);
$this->assertEquals($expected, $errors);
- fclose($handle);
+ chmod($file, 0644);
+ chmod($folder, 0755);
$return = $Folder->delete();
$this->assertTrue($return);
@@ -803,7 +806,7 @@ public function testReset() {
$messages = $Folder->messages();
$errors = $Folder->errors();
$expected = array(
- $folder . DS . 'file removed',
+ $file . ' removed',
$folder . ' removed',
);
sort($expected);

2 comments on commit ce9ad1f

@dereuromark
CakePHP member

but that would only work on nix then (not on windows I assume - since folder permissions dont work there).

you probably need a skipIf in this case then.

@dereuromark
CakePHP member

wow, folder permissions work on windows8. there the tests still pass after your change.

Please sign in to comment.
Something went wrong with that request. Please try again.