mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 00:48:25 +00:00
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:
parent
effc9d4029
commit
6fe654cd9e
1 changed files with 10 additions and 0 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Reference in a new issue