summaryrefslogtreecommitdiffstats
path: root/php-twig-extensions-upstream.patch
blob: 4576737a067b5ea57ec92658f7c0598e3c6affe9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From 658c6eade785eb8b0257e28dfa5165383aeffcd9 Mon Sep 17 00:00:00 2001
From: Fabien Potencier <fabien.potencier@gmail.com>
Date: Fri, 30 Sep 2016 13:06:23 -0700
Subject: [PATCH] fixed tests

---
 test/Twig/Tests/Extension/DateTest.php | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)

diff --git a/test/Twig/Tests/Extension/DateTest.php b/test/Twig/Tests/Extension/DateTest.php
index 8453d13..0080098 100644
--- a/test/Twig/Tests/Extension/DateTest.php
+++ b/test/Twig/Tests/Extension/DateTest.php
@@ -21,21 +21,7 @@ class Twig_Tests_Extension_DateTest extends PHPUnit_Framework_TestCase
 
     public function setUp()
     {
-        $timezone = new DateTimeZone(date_default_timezone_get());
-
-        $coreExtension = $this->getMockBuilder('Twig_Extension_Core')->getMock();
-        $coreExtension
-            ->expects($this->any())
-            ->method('getTimezone')
-            ->will($this->returnValue($timezone));
-
-        $this->env = $this->getMockBuilder('Twig_Environment')->disableOriginalConstructor()->getMock();
-        $this->env
-            ->expects($this->any())
-            ->method('getExtension')
-            ->with('core')
-            ->will($this->returnValue($coreExtension))
-        ;
+        $this->env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock());
     }
 
     /**