From a989abdc2203700b6103ad171351e82dfc143744 Mon Sep 17 00:00:00 2001 From: meus Date: Mon, 3 Sep 2007 22:09:05 +0000 Subject: [PATCH] fixed validator tests that used the old API --- tests/ValidatorTestCase.php | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/tests/ValidatorTestCase.php b/tests/ValidatorTestCase.php index 3cf4e6e23..9bf33584c 100644 --- a/tests/ValidatorTestCase.php +++ b/tests/ValidatorTestCase.php @@ -181,18 +181,15 @@ class Doctrine_Validator_TestCase extends Doctrine_UnitTestCase $validator = new Doctrine_Validator_Email(); - $email = $this->connection->create("Email"); - $this->assertFalse($validator->validate($email,"address","example@example",null)); - $this->assertFalse($validator->validate($email,"address","example@@example",null)); - $this->assertFalse($validator->validate($email,"address","example@example.",null)); - $this->assertFalse($validator->validate($email,"address","example@e..",null)); - - $this->assertFalse($validator->validate($email,"address","example@e..",null)); - - $this->assertTrue($validator->validate($email,"address","null@pookey.co.uk",null)); - $this->assertTrue($validator->validate($email,"address","null@pookey.com",null)); - $this->assertTrue($validator->validate($email,"address","null@users.doctrine.pengus.net",null)); + $this->assertFalse($validator->validate("example@example")); + $this->assertFalse($validator->validate("example@@example")); + $this->assertFalse($validator->validate("example@example.")); + $this->assertFalse($validator->validate("example@e..")); + $this->assertTrue($validator->validate("null+doctrine@pookey.co.uk")); + $this->assertTrue($validator->validate("null@pookey.co.uk")); + $this->assertTrue($validator->validate("null@pookey.com")); + $this->assertTrue($validator->validate("null@users.doctrine.pengus.net")); } /**