From d2ca4b5d56176ed1a8c890e15b42281d118d93b2 Mon Sep 17 00:00:00 2001 From: Augusto Pascutti Date: Tue, 10 Dec 2013 00:43:43 -0200 Subject: [PATCH] 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. --- tests/library/Respect/Validation/Rules/ZendTest.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/library/Respect/Validation/Rules/ZendTest.php b/tests/library/Respect/Validation/Rules/ZendTest.php index 9df9dff4f..9333488e6 100644 --- a/tests/library/Respect/Validation/Rules/ZendTest.php +++ b/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.'); + } } /**