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

Zend\Validator tests refactoring #6941

Closed
gianarb opened this issue Nov 28, 2014 · 2 comments
Closed

Zend\Validator tests refactoring #6941

gianarb opened this issue Nov 28, 2014 · 2 comments
Assignees
Milestone

Comments

@gianarb
Copy link
Contributor

gianarb commented Nov 28, 2014

Time: 11.36 seconds, Memory: 76.00Mb
There were 4 errors:
1) ZendTest\Validator\EmailAddressTest::testMXRecords
constant(): Couldn't find constant TESTS_ZEND_VALIDATOR_ONLINE_ENABLED

/home/gianarb/git/zf2/tests/ZendTest/Validator/EmailAddressTest.php:303
........
FAILURES!
Tests: 1436, Assertions: 3068, Errors: 4, Incomplete: 5.

This test failed because

if (!constant('TESTS_ZEND_VALIDATOR_ONLINE_ENABLED')) {
    $this->markTestSkipped('Testing MX records has been disabled');
}

I'm replacing them with

if (!defined('TESTS_ZEND_VALIDATOR_ONLINE_ENABLED')) {
    $this->markTestSkipped('Testing MX records has been disabled');
}
@Pittiplatsch
Copy link

if (
    !defined('TESTS_ZEND_VALIDATOR_ONLINE_ENABLED')
    || !constant('TESTS_ZEND_VALIDATOR_ONLINE_ENABLED')
) {
    $this->markTestSkipped('Testing MX records has been disabled');
}

@Ocramius Ocramius mentioned this issue Nov 28, 2014
@Ocramius Ocramius added this to the 2.3.4 milestone Nov 28, 2014
@Ocramius Ocramius self-assigned this Nov 28, 2014
Ocramius added a commit that referenced this issue Nov 28, 2014
Ocramius added a commit that referenced this issue Nov 28, 2014
…te' into develop

Close #6941
Close #6943
Forward port #6941
Forward port #6943
@Ocramius
Copy link
Member

Handled in #6943

gianarb pushed a commit to zendframework/zend-validator that referenced this issue May 15, 2015
gianarb pushed a commit to zendframework/zend-validator that referenced this issue May 15, 2015
…etter handling of skipped MX-related EmailAddress validator network-based tests
gianarb pushed a commit to zendframework/zend-validator that referenced this issue May 15, 2015
gianarb pushed a commit to zendframework/zend-validator that referenced this issue May 15, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants