[Tests] Skip Routing annotation tests when Doctrine is not available.
This commit is contained in:
parent
5dba01851e
commit
d3e9104b52
@ -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')
|
||||
|
@ -25,6 +25,8 @@ class AnnotationClassLoaderTest extends AbstractAnnotationLoaderTest
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
$this->loader = $this->getClassLoader($this->getReader());
|
||||
}
|
||||
|
||||
|
@ -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));
|
||||
}
|
||||
|
@ -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));
|
||||
}
|
||||
|
Reference in New Issue
Block a user