Skip to content

Commit d2ca4b5

Browse files
author
Augusto Pascutti
committed
Skip instead of fail if Zend/Validator is not present.
It makes more sense to skip a test that can't be executed than failing indicating a problem with the test suite.
1 parent 0bcf6ef commit d2ca4b5

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tests/library/Respect/Validation/Rules/ZendTest.php

+3-4
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ class ZendTest extends \PHPUnit_Framework_TestCase
77
{
88
public function testZendDependency()
99
{
10-
$this->assertTrue(
11-
class_exists('\Zend\Validator\Date'),
12-
'Zend Framework 2 Validator not installed.'
13-
);
10+
if (false === class_exists('\Zend\Validator\Date')) {
11+
$this->markTestSkipped('Zend Framework 2 Validator not installed.');
12+
}
1413
}
1514

1615
/**

0 commit comments

Comments
 (0)