From 384c5a0624ff76430f0704c178bf7e87f4c221fa Mon Sep 17 00:00:00 2001 From: DarkAngelBGE Date: Wed, 27 Aug 2008 08:53:44 +0000 Subject: [PATCH] adding failing test that proves #5225 git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7520 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/tests/cases/libs/model/model.test.php | 2 +- cake/tests/cases/libs/set.test.php | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/cake/tests/cases/libs/model/model.test.php b/cake/tests/cases/libs/model/model.test.php index f03373dc7..b06593c93 100644 --- a/cake/tests/cases/libs/model/model.test.php +++ b/cake/tests/cases/libs/model/model.test.php @@ -4223,7 +4223,7 @@ class ModelTest extends CakeTestCase { $this->assertEqual($TestModel->invalidFields(), $expected); } /** - * Tests validation parameter order in custom validation methods + * Tests validation parameter fieldList in invalidFields * * @access public * @return void diff --git a/cake/tests/cases/libs/set.test.php b/cake/tests/cases/libs/set.test.php index fd7bbb6b5..91fc84e23 100644 --- a/cake/tests/cases/libs/set.test.php +++ b/cake/tests/cases/libs/set.test.php @@ -422,8 +422,16 @@ class SetTest extends CakeTestCase { ); $expected = array( - $c[0], $c[0]['a']['I'], $c[1], $c[2], array('a' => $c[2]['a']['II']['a']), $c[2]['a']['II']['III'] + array( + 'a' => array( + 'II' => array( + 'a' => 3, + ) + ) + ) ); + $r = Set::extract('/a/II[a=3]/..', $c); + $this->assertEqual($r, $expected); $expected = array(1,2,3,4,5); $r = Set::extract('/User/id', $a); @@ -1732,7 +1740,7 @@ class SetTest extends CakeTestCase { $piece->PiecesUser->modified = '2008-01-01 00:00:00'; $piece->PiecesUser->piece_id = 1; $piece->PiecesUser->user_id = 2; - + $expected->Piece = array($piece); $this->assertIdentical($expected, $result);