Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
to test the specific behavior as reported in zendframework/zendframework#5796. Test now fails before the
patch, passes afterwards.
  • Loading branch information
weierophinney committed Mar 4, 2014
1 parent a446e88 commit 23c1f01
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/ExplodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

use Zend\Validator\Explode;
use Zend\Validator\EmailAddress;
use Zend\Validator\Regex;

/**
* @group Zend_Validator
Expand Down Expand Up @@ -137,14 +138,16 @@ public function testSetValidatorInvalidParam()
public function testGetMessagesMultipleInvalid()
{
$validator = new Explode(array(
'validator' => new EmailAddress,
'validator' => new Regex(
'/^[a-zA-Z0-9.!#$%&\'*+\/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/'
),
'valueDelimiter' => ',',
'breakOnFirstFailure' => true,
'breakOnFirstFailure' => false,
));

$messages = array(
0 => array(
'emailAddressInvalidFormat' => 'The input is not a valid email address. Use the basic format local-part@hostname',
'regexNotMatch' => "The input does not match against pattern '/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/'",
),
);

Expand Down

0 comments on commit 23c1f01

Please sign in to comment.