Permalink
Browse files

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.
  • Loading branch information...
augustohp committed Dec 10, 2013
1 parent 0bcf6ef commit d2ca4b5d56176ed1a8c890e15b42281d118d93b2
Showing with 3 additions and 4 deletions.
  1. +3 −4 tests/library/Respect/Validation/Rules/ZendTest.php
@@ -7,10 +7,9 @@ class ZendTest extends \PHPUnit_Framework_TestCase
{
public function testZendDependency()
{
- $this->assertTrue(
- class_exists('\Zend\Validator\Date'),
- 'Zend Framework 2 Validator not installed.'
- );
+ if (false === class_exists('\Zend\Validator\Date')) {
+ $this->markTestSkipped('Zend Framework 2 Validator not installed.');
+ }
}
/**

0 comments on commit d2ca4b5

Please sign in to comment.