[BUGFIX] Fix EmailAddressValidatorTest
authorLienhart Woitok <lienhart.woitok@netlogix.de>
Sat, 11 Jun 2011 21:47:07 +0000 (23:47 +0200)
committerLienhart Woitok <lienhart.woitok@netlogix.de>
Sat, 11 Jun 2011 21:49:33 +0000 (23:49 +0200)
The test for valid email addresses tried to iterate over a nonexistant array
of valid addresses instead of using the address passed by the data provider.
This fixes the test by testing with the value from the dataprovider.

Change-Id: If77015f7a0f811c678395a0b2113c90a3cd9d5f8

typo3/sysext/extbase/Tests/Unit/Validation/Validator/EmailAddressValidatorTest.php

index 8f6c6d9..6713dc3 100644 (file)
@@ -57,9 +57,7 @@ class Tx_Extbase_Tests_Unit_Validation_Validator_EmailAddressValidatorTest exten
         */
        public function emailAddressValidatorReturnsTrueForAValidEmailAddress($address) {
                $emailAddressValidator = new Tx_Extbase_Validation_Validator_EmailAddressValidator();
-               foreach ($this->validAddresses as $address) {
-                       $this->assertTrue($emailAddressValidator->isValid($address), "$address was declared to be invalid, but it is valid.");
-               }
+               $this->assertTrue($emailAddressValidator->isValid($address), "$address was declared to be invalid, but it is valid.");
        }
 
        /**