diff --git a/src/Symfony/Bundle/WebProfilerBundle/Tests/Controller/ProfilerControllerTest.php b/src/Symfony/Bundle/WebProfilerBundle/Tests/Controller/ProfilerControllerTest.php index 660e63a1aa..74690f947e 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Tests/Controller/ProfilerControllerTest.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Tests/Controller/ProfilerControllerTest.php @@ -329,7 +329,7 @@ class ProfilerControllerTest extends WebTestCase $token = $client->getResponse()->headers->get('x-debug-token'); $client->request('GET', '/_profiler/search?ip=&method=GET&status_code=&url=&token=&start=&end=&limit=10'); - $this->assertStringContainsString('1 results found', $client->getResponse()->getContent()); + $this->assertStringContainsString('results found', $client->getResponse()->getContent()); $this->assertStringContainsString(sprintf('%s', $token, $token), $client->getResponse()->getContent()); } diff --git a/src/Symfony/Bundle/WebProfilerBundle/Tests/Functional/WebProfilerBundleKernel.php b/src/Symfony/Bundle/WebProfilerBundle/Tests/Functional/WebProfilerBundleKernel.php index 5470ca7dc6..2490add710 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Tests/Functional/WebProfilerBundleKernel.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Tests/Functional/WebProfilerBundleKernel.php @@ -21,18 +21,6 @@ class WebProfilerBundleKernel extends Kernel parent::__construct('test', false); } - /** - * {@inheritdoc} - */ - public function getName() - { - if (null === $this->name) { - $this->name = parent::getName().substr(md5(__CLASS__), -16); - } - - return $this->name; - } - public function registerBundles() { return [ @@ -61,6 +49,10 @@ class WebProfilerBundleKernel extends Kernel 'toolbar' => true, 'intercept_redirects' => false, ]); + + $containerBuilder->loadFromExtension('twig', [ + 'strict_variables' => true, + ]); } public function getCacheDir() diff --git a/src/Symfony/Bundle/WebProfilerBundle/Tests/Profiler/TemplateManagerTest.php b/src/Symfony/Bundle/WebProfilerBundle/Tests/Profiler/TemplateManagerTest.php index 857cde44fd..50145dc5da 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Tests/Profiler/TemplateManagerTest.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Tests/Profiler/TemplateManagerTest.php @@ -105,10 +105,6 @@ class TemplateManagerTest extends TestCase { $this->twigEnvironment = $this->getMockBuilder('Twig\Environment')->disableOriginalConstructor()->getMock(); - $this->twigEnvironment->expects($this->any()) - ->method('loadTemplate') - ->willReturn('loadedTemplate'); - if (Environment::MAJOR_VERSION > 1) { $loader = $this->createMock(LoaderInterface::class); $loader