From 2acb54d679f0c6209300a3d00328cb2993e112fb Mon Sep 17 00:00:00 2001 From: romanb Date: Wed, 28 Mar 2007 11:08:00 +0000 Subject: [PATCH] quick fix. --- tests/ValidatorTestCase.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/ValidatorTestCase.php b/tests/ValidatorTestCase.php index c152c11a4..e954aea12 100644 --- a/tests/ValidatorTestCase.php +++ b/tests/ValidatorTestCase.php @@ -219,12 +219,14 @@ class Doctrine_Validator_TestCase extends Doctrine_UnitTestCase { } catch(Doctrine_Validator_Exception $e) { $this->pass(); $a = $e->getInvalidRecords(); + //var_dump($a[1]->getErrorStack()); } - - $this->assertTrue(is_array($a)); - $emailStack = $a[array_search($user->Email, $a)]->errorStack(); - $userStack = $a[array_search($user, $a)]->errorStack(); + $this->assertTrue(is_array($a)); + //var_dump(array_search($user, $a)); + $emailStack = $user->Email->errorStack(); + $userStack = $user->errorStack(); + //var_dump($userStack); $this->assertTrue(in_array('email', $emailStack['address'])); $this->assertTrue(in_array('length', $userStack['name']));