1
0
mirror of synced 2025-01-18 06:21:40 +03:00

quick fix.

This commit is contained in:
romanb 2007-03-28 11:08:00 +00:00
parent 61056d37c4
commit 2acb54d679

View File

@ -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']));