diff --git a/tests/Symfony/Tests/Component/Routing/Loader/AbstractAnnotationLoaderTest.php b/tests/Symfony/Tests/Component/Routing/Loader/AbstractAnnotationLoaderTest.php index c10b2df640..3d6a000a37 100644 --- a/tests/Symfony/Tests/Component/Routing/Loader/AbstractAnnotationLoaderTest.php +++ b/tests/Symfony/Tests/Component/Routing/Loader/AbstractAnnotationLoaderTest.php @@ -18,6 +18,13 @@ use Symfony\Component\Routing\RouteCollection; abstract class AbstractAnnotationLoaderTest extends \PHPUnit_Framework_TestCase { + public function setUp() + { + if (!class_exists('Doctrine\\Common\\Version')) { + $this->markTestSkipped('Doctrine is not available.'); + } + } + public function getReader() { return $this->getMockBuilder('Doctrine\Common\Annotations\Reader') diff --git a/tests/Symfony/Tests/Component/Routing/Loader/AnnotationClassLoaderTest.php b/tests/Symfony/Tests/Component/Routing/Loader/AnnotationClassLoaderTest.php index cdf16b104d..dad2a00052 100644 --- a/tests/Symfony/Tests/Component/Routing/Loader/AnnotationClassLoaderTest.php +++ b/tests/Symfony/Tests/Component/Routing/Loader/AnnotationClassLoaderTest.php @@ -25,6 +25,8 @@ class AnnotationClassLoaderTest extends AbstractAnnotationLoaderTest public function setUp() { + parent::setUp(); + $this->loader = $this->getClassLoader($this->getReader()); } diff --git a/tests/Symfony/Tests/Component/Routing/Loader/AnnotationDirectoryLoaderTest.php b/tests/Symfony/Tests/Component/Routing/Loader/AnnotationDirectoryLoaderTest.php index c5fe2988e4..2e652a6670 100644 --- a/tests/Symfony/Tests/Component/Routing/Loader/AnnotationDirectoryLoaderTest.php +++ b/tests/Symfony/Tests/Component/Routing/Loader/AnnotationDirectoryLoaderTest.php @@ -26,6 +26,8 @@ class AnnotationDirectoryLoaderTest extends AbstractAnnotationLoaderTest public function setUp() { + parent::setUp(); + $this->reader = $this->getReader(); $this->loader = new AnnotationDirectoryLoader(new FileLocator(), $this->getClassLoader($this->reader)); } diff --git a/tests/Symfony/Tests/Component/Routing/Loader/AnnotationFileLoaderTest.php b/tests/Symfony/Tests/Component/Routing/Loader/AnnotationFileLoaderTest.php index 809bdf0929..2813c00d6a 100644 --- a/tests/Symfony/Tests/Component/Routing/Loader/AnnotationFileLoaderTest.php +++ b/tests/Symfony/Tests/Component/Routing/Loader/AnnotationFileLoaderTest.php @@ -26,6 +26,8 @@ class AnnotationFileLoaderTest extends AbstractAnnotationLoaderTest public function setUp() { + parent::setUp(); + $this->reader = $this->getReader(); $this->loader = new AnnotationFileLoader(new FileLocator(), $this->getClassLoader($this->reader)); }