Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit d2ca4b5d56176ed1a8c890e15b42281d118d93b2 1 parent 0bcf6ef
@augustohp augustohp authored
Showing with 3 additions and 4 deletions.
  1. +3 −4 tests/library/Respect/Validation/Rules/ZendTest.php
View
7 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.');
+ }
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.