FragmentTest.php 892 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\Bundle\FrameworkBundle\Tests\Functional;
  11. class FragmentTest extends WebTestCase
  12. {
  13. /**
  14. * @dataProvider getConfigs
  15. */
  16. public function testFragment($insulate)
  17. {
  18. $client = $this->createClient(array('test_case' => 'Fragment', 'root_config' => 'config.yml'));
  19. if ($insulate) {
  20. $client->insulate();
  21. }
  22. $client->request('GET', '/fragment_home');
  23. $this->assertEquals('bar txt--html--es--fr', $client->getResponse()->getContent());
  24. }
  25. public function getConfigs()
  26. {
  27. return array(
  28. array(false),
  29. array(true),
  30. );
  31. }
  32. }