[Validator] Skipping AnnotationLoader tests if doctrine-common is not present

This commit is contained in:
Jordi Boggiano 2010-11-17 23:46:40 +01:00 committed by Fabien Potencier
parent b3ae62e2c4
commit b2bd7ce57d

View File

@ -16,6 +16,13 @@ use Symfony\Tests\Component\Validator\Fixtures\ConstraintA;
class AnnotationLoaderTest extends \PHPUnit_Framework_TestCase
{
public function setUp()
{
if (!class_exists('Doctrine\Common\Annotations\AnnotationReader')) {
$this->markTestSkipped('Unmet dependency: doctrine-common is required for this test');
}
}
public function testLoadClassMetadataReturnsTrueIfSuccessful()
{
$loader = new AnnotationLoader();