From 0bd1a41329d45425832c5d9377f1e16462b36c5e Mon Sep 17 00:00:00 2001 From: "mariano.iglesias" Date: Sun, 29 Apr 2007 00:56:21 +0000 Subject: [PATCH] Adding test for #2488 git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4897 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/tests/cases/libs/set.test.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/cake/tests/cases/libs/set.test.php b/cake/tests/cases/libs/set.test.php index 3797a9413..e21391a20 100644 --- a/cake/tests/cases/libs/set.test.php +++ b/cake/tests/cases/libs/set.test.php @@ -161,6 +161,21 @@ class SetTest extends UnitTestCase { // And also updates it's own value property $this->assertIdentical($Set->value, $expected); } + + function testExtract() { + $a = array( + array( 'lday' => '20 sales' ), + array( 'lday' => '2 sales' ) + ); + $result = Set::extract($a, '{n}.lday'); + + $expected = array( + 0 => '20 sales', + 1 => '2 sales' + ); + + $this->assertIdentical($result, $expected); + } } ?> \ No newline at end of file