RoutesCacheWarmUpTest.php 981 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /*
  3. * This file is part of the Sonata Project package.
  4. *
  5. * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
  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 Sonata\AdminBundle\Tests\Route;
  11. use Sonata\AdminBundle\Route\RoutesCacheWarmUp;
  12. class RoutesCacheWarmUpTest extends \PHPUnit_Framework_TestCase
  13. {
  14. /**
  15. * @var RoutesCacheWarmUp
  16. */
  17. protected $routesCacheWarmUp;
  18. public function setUp()
  19. {
  20. $routesCache = $this->getMockBuilder('Sonata\AdminBundle\Route\RoutesCache')->disableOriginalConstructor()->getMock();
  21. $pool = $this->getMockBuilder('Sonata\AdminBundle\Admin\Pool')->disableOriginalConstructor()->getMock();
  22. $this->routesCacheWarmUp = new RoutesCacheWarmUp($routesCache, $pool);
  23. }
  24. public function testIsOptional()
  25. {
  26. $this->assertTrue($this->routesCacheWarmUp->isOptional());
  27. }
  28. }