adding test for Set::reverse()

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6032 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
gwoo 2007-11-20 18:20:47 +00:00
parent effc9d4029
commit 6fe654cd9e

View file

@ -455,6 +455,16 @@ class SetTest extends UnitTestCase {
'__findMethods' => array('all' => true, 'first' => true, 'count' => true, 'neighbors' => true), '_log' => null);
$result = Set::reverse($model);
$this->assertIdentical($result, $expected);
$class = new stdClass;
$class->User = new stdClass;
$class->User->id = 100;
$class->someString = 'this is some string';
$class->Profile = new stdClass;
$class->Profile->name = 'Joe Mamma';
$result = Set::reverse($class);
$expected = array('User' => array('id' => '100'), 'Profile' => array('name' => 'Joe Mamma'));
$this->assertEqual($result, $expected);
}
function testFormatting() {