summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-10-04 09:38:46 +0200
committerRemi Collet <fedora@famillecollet.com>2016-10-04 09:38:46 +0200
commit6085ad2b4a1ae79a08855f96bf122a37c6864a91 (patch)
tree70631540fdaf166def7092549243863e57840b4f
parent03f119f01cd1326ccf97ba082ef5bb8e9a706a61 (diff)
php-twig-extensions: upstream patch
-rw-r--r--php-twig-extensions-upstream.patch36
-rw-r--r--php-twig-extensions.spec9
2 files changed, 44 insertions, 1 deletions
diff --git a/php-twig-extensions-upstream.patch b/php-twig-extensions-upstream.patch
new file mode 100644
index 0000000..4576737
--- /dev/null
+++ b/php-twig-extensions-upstream.patch
@@ -0,0 +1,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());
+ }
+
+ /**
diff --git a/php-twig-extensions.spec b/php-twig-extensions.spec
index 61be0f8..cbc5533 100644
--- a/php-twig-extensions.spec
+++ b/php-twig-extensions.spec
@@ -32,7 +32,7 @@
Name: php-%{composer_vendor}-%{composer_project}
Version: %{github_version}
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Twig extensions
Group: Development/Libraries
@@ -40,6 +40,8 @@ License: MIT
URL: http://twig.sensiolabs.org/doc/extensions/index.html
Source0: https://github.com/%{github_owner}/%{github_name}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz
+Patch0: %{name}-upstream.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
# Tests
@@ -76,6 +78,8 @@ Common additional features for Twig that do not directly belong in core Twig.
%prep
%setup -qn %{github_name}-%{github_commit}
+%patch0 -p1 -b .upstream
+
: Create autoloader
cat <<'AUTOLOAD' | tee lib/Twig/Extensions/autoload.php
<?php
@@ -142,6 +146,9 @@ rm -rf %{buildroot}
%changelog
+* Tue Oct 4 2016 Remi Collet <remi@fedoraproject.org> - 1.4.0-2
+- add upstream patch for test suite with twig 1.26
+
* Sun Sep 25 2016 Shawn Iwinski <shawn.iwinski@gmail.com> - 1.4.0-1
- Updated to 1.4.0 (RHBZ #1378643)