From 2e8dd14d94008e265b16739083998d878e935eb4 Mon Sep 17 00:00:00 2001 From: tomaszmadeyski Date: Fri, 2 Jun 2017 14:16:38 +0200 Subject: [PATCH] EZP-27438 fixing Twig 2.x compatibility issues in tests (#874) --- Tests/Twig/TwigYuiExtensionTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tests/Twig/TwigYuiExtensionTest.php b/Tests/Twig/TwigYuiExtensionTest.php index 2ebdb4e34..70696520a 100644 --- a/Tests/Twig/TwigYuiExtensionTest.php +++ b/Tests/Twig/TwigYuiExtensionTest.php @@ -134,8 +134,8 @@ public function testConfig(array $modules, $filter, $expectedResult) */ protected function getEnvironmentMock() { - $envMock = $this->getMock('Twig_Environment'); - $functionMock = $this->getMock('Twig_Function'); + $envMock = $this->getMockBuilder('Twig_Environment')->disableOriginalConstructor()->getMock(); + $functionMock = $this->getMockBuilder('Twig_Function')->disableOriginalConstructor()->getMock(); $envMock->expects($this->any())->method('getFunction')->will($this->returnValue($functionMock)); $functionMock ->expects($this->any())