Skip to content

Commit

Permalink
Skip instead of fail if Zend/Validator is not present.
Browse files Browse the repository at this point in the history
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
Augusto Pascutti committed Dec 10, 2013
1 parent 0bcf6ef commit d2ca4b5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/library/Respect/Validation/Rules/ZendTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
}
}

/**
Expand Down

0 comments on commit d2ca4b5

Please sign in to comment.