AbstractAnnotationLoaderTest.php 998 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Routing\Tests\Loader;
  11. abstract class AbstractAnnotationLoaderTest extends \PHPUnit_Framework_TestCase
  12. {
  13. protected function setUp()
  14. {
  15. if (!class_exists('Doctrine\\Common\\Version')) {
  16. $this->markTestSkipped('Doctrine is not available.');
  17. }
  18. }
  19. public function getReader()
  20. {
  21. return $this->getMockBuilder('Doctrine\Common\Annotations\Reader')
  22. ->disableOriginalConstructor()
  23. ->getMock()
  24. ;
  25. }
  26. public function getClassLoader($reader)
  27. {
  28. return $this->getMockBuilder('Symfony\Component\Routing\Loader\AnnotationClassLoader')
  29. ->setConstructorArgs(array($reader))
  30. ->getMockForAbstractClass()
  31. ;
  32. }
  33. }