Fixes #5796#5808
Conversation
There was a problem hiding this comment.
@samsonasik the provided test doesn't seem to fail on my machine (excluding the fix).
What are the requirements for it to fail?
There was a problem hiding this comment.
when it called via browser, without the SORT_REGULAR option, it will cause error like described at #5796
There was a problem hiding this comment.
Yeah, but the test doesn't seem to raise this problem, @samsonasik.
There was a problem hiding this comment.
Any suggestion for it ?
Warm regards,
Abdul Malik Ikhsan
Pada 4 Mar 2014, pukul 15.04, Marco Pivetta [email protected] menulis:
In tests/ZendTest/Validator/ExplodeTest.php:
@@ -129,4 +130,25 @@ public function testSetValidatorInvalidParam()
$validator = new Explode();
$validator->setValidator('inarray');
}
+
- /**
\* @group ZF2-5796*/- public function testGetMessagesMultipleInvalid()
Yeah, but the test doesn't seem to raise this problem, @samsonasik.—
Reply to this email directly or view it on GitHub.
There was a problem hiding this comment.
I think a valid test case will use the regex validator as done in Zend\Form\Element\Email::getEmailValidator(). Going to try that now and see if I see a failure with that.
There was a problem hiding this comment.
Okay, the trick to getting a test that failed was as follows:
- Use the same validator as
Zend\Form\Element\Emailuses. - Ensure the
breakOnFirstFailureflag is set tofalse, which is the default value, and which is used in the above element.
Once I did that, I had a failing test case; the suggested fix in this PR makes the test pass. Will merge shortly.
to test the specific behavior as reported in #5796. Test now fails before the patch, passes afterwards.
…ix/multiple-invalid-explodevalidator Fixes zendframework/zendframework#5796
to test the specific behavior as reported in zendframework/zendframework#5796. Test now fails before the patch, passes afterwards.
Fixes #5796