Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updating Folder tests for new file.

Converting assertIdentical to assertSame.
  • Loading branch information...
commit be98e0b962b5436f638eb3ba3ee17801149489ed 1 parent f0819d3
@markstory markstory authored
Showing with 25 additions and 25 deletions.
  1. +25 −25 lib/Cake/Test/Case/Utility/FolderTest.php
View
50 lib/Cake/Test/Case/Utility/FolderTest.php
@@ -342,16 +342,16 @@ public function testFolderTree() {
);
$result = $Folder->tree(CAKE . 'Config', false);
- $this->assertIdentical(array_diff($expected[0], $result[0]), array());
- $this->assertIdentical(array_diff($result[0], $expected[0]), array());
+ $this->assertSame(array_diff($expected[0], $result[0]), array());
+ $this->assertSame(array_diff($result[0], $expected[0]), array());
$result = $Folder->tree(CAKE . 'Config', false, 'dir');
- $this->assertIdentical(array_diff($expected[0], $result), array());
- $this->assertIdentical(array_diff($expected[0], $result), array());
+ $this->assertSame(array_diff($expected[0], $result), array());
+ $this->assertSame(array_diff($expected[0], $result), array());
$result = $Folder->tree(CAKE . 'Config', false, 'files');
- $this->assertIdentical(array_diff($expected[1], $result), array());
- $this->assertIdentical(array_diff($expected[1], $result), array());
+ $this->assertSame(array_diff($expected[1], $result), array());
+ $this->assertSame(array_diff($expected[1], $result), array());
}
/**
@@ -488,29 +488,29 @@ public function testFind() {
$Folder->cd(CAKE . 'Config');
$result = $Folder->find();
$expected = array('config.php');
- $this->assertIdentical(array_diff($expected, $result), array());
- $this->assertIdentical(array_diff($expected, $result), array());
+ $this->assertSame(array_diff($expected, $result), array());
+ $this->assertSame(array_diff($expected, $result), array());
$result = $Folder->find('.*', true);
- $expected = array('config.php');
- $this->assertIdentical($expected, $result);
+ $expected = array('config.php', 'routes.php');
+ $this->assertSame($expected, $result);
$result = $Folder->find('.*\.php');
$expected = array('config.php');
- $this->assertIdentical(array_diff($expected, $result), array());
- $this->assertIdentical(array_diff($expected, $result), array());
+ $this->assertSame(array_diff($expected, $result), array());
+ $this->assertSame(array_diff($expected, $result), array());
$result = $Folder->find('.*\.php', true);
- $expected = array('config.php');
- $this->assertIdentical($expected, $result);
+ $expected = array('config.php', 'routes.php');
+ $this->assertSame($expected, $result);
$result = $Folder->find('.*ig\.php');
$expected = array('config.php');
- $this->assertIdentical($expected, $result);
+ $this->assertSame($expected, $result);
$result = $Folder->find('config\.php');
$expected = array('config.php');
- $this->assertIdentical($expected, $result);
+ $this->assertSame($expected, $result);
$Folder->cd(TMP);
$file = new File($Folder->pwd() . DS . 'paths.php', true);
@@ -518,12 +518,12 @@ public function testFind() {
$Folder->cd('testme');
$result = $Folder->find('paths\.php');
$expected = array();
- $this->assertIdentical($expected, $result);
+ $this->assertSame($expected, $result);
$Folder->cd($Folder->pwd() . '/..');
$result = $Folder->find('paths\.php');
$expected = array('paths.php');
- $this->assertIdentical($expected, $result);
+ $this->assertSame($expected, $result);
$Folder->cd(TMP);
$Folder->delete($Folder->pwd() . DS . 'testme');
@@ -543,14 +543,14 @@ public function testFindRecursive() {
$expected = array(
CAKE . 'Config' . DS . 'config.php'
);
- $this->assertIdentical(array_diff($expected, $result), array());
- $this->assertIdentical(array_diff($expected, $result), array());
+ $this->assertSame(array_diff($expected, $result), array());
+ $this->assertSame(array_diff($expected, $result), array());
$result = $Folder->findRecursive('(config|paths)\.php', true);
$expected = array(
CAKE . 'Config' . DS . 'config.php'
);
- $this->assertIdentical($expected, $result);
+ $this->assertSame($expected, $result);
$Folder->cd(TMP);
$Folder->create($Folder->pwd() . DS . 'testme');
@@ -560,7 +560,7 @@ public function testFindRecursive() {
$Folder->cd(TMP . 'sessions');
$result = $Folder->findRecursive('paths\.php');
$expected = array();
- $this->assertIdentical($expected, $result);
+ $this->assertSame($expected, $result);
$Folder->cd(TMP . 'testme');
$File = new File($Folder->pwd() . DS . 'my.php');
@@ -572,15 +572,15 @@ public function testFindRecursive() {
TMP . 'testme' . DS . 'my.php',
TMP . 'testme' . DS . 'paths.php'
);
- $this->assertIdentical(array_diff($expected, $result), array());
- $this->assertIdentical(array_diff($expected, $result), array());
+ $this->assertSame(array_diff($expected, $result), array());
+ $this->assertSame(array_diff($expected, $result), array());
$result = $Folder->findRecursive('(paths|my)\.php', true);
$expected = array(
TMP . 'testme' . DS . 'my.php',
TMP . 'testme' . DS . 'paths.php'
);
- $this->assertIdentical($expected, $result);
+ $this->assertSame($expected, $result);
$Folder->cd(CAKE . 'Config');
$Folder->cd(TMP);

0 comments on commit be98e0b

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