LegacyContainerAwareHIncludeFragmentRendererTest.php 1.0 KB

123456789101112131415161718192021222324252627282930313233
  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\Bundle\FrameworkBundle\Tests\Fragment;
  11. use Symfony\Bundle\FrameworkBundle\Fragment\ContainerAwareHIncludeFragmentRenderer;
  12. use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
  13. use Symfony\Component\HttpFoundation\Request;
  14. /**
  15. * @group legacy
  16. */
  17. class LegacyContainerAwareHIncludeFragmentRendererTest extends TestCase
  18. {
  19. public function testRender()
  20. {
  21. $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock();
  22. $container->expects($this->once())
  23. ->method('get')
  24. ->will($this->returnValue($this->getMockBuilder('Twig\Environment')->disableOriginalConstructor()->getMock()))
  25. ;
  26. $renderer = new ContainerAwareHIncludeFragmentRenderer($container);
  27. $renderer->render('/', Request::create('/'));
  28. }
  29. }