summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2014-11-25 10:42:28 +0100
committerRemi Collet <fedora@famillecollet.com>2014-11-25 10:42:28 +0100
commit6bfdffba511e29d3c661a0e08c6628e6ce271264 (patch)
treed37b2c59415479de1a38cdc34cbb6603a5f2bb28
parentbb83fd62b9d552d43e1a1572fd1eb84d769a375e (diff)
php-horde-Horde-Mime: add upstream patch for tests
-rw-r--r--Horde_Kolab_Storage-upstream.patch94
-rw-r--r--php-horde-Horde-Kolab-Storage.spec10
2 files changed, 103 insertions, 1 deletions
diff --git a/Horde_Kolab_Storage-upstream.patch b/Horde_Kolab_Storage-upstream.patch
new file mode 100644
index 0000000..76740c3
--- /dev/null
+++ b/Horde_Kolab_Storage-upstream.patch
@@ -0,0 +1,94 @@
+From f07864e5b4b201999944decc13b629eadb3d4248 Mon Sep 17 00:00:00 2001
+From: Michael M Slusarz <slusarz@horde.org>
+Date: Mon, 10 Nov 2014 23:56:08 -0700
+Subject: [PATCH] Fix tests
+
+---
+ .../lib/Horde/Kolab/Storage/Object/MimeType.php | 2 +-
+ .../test/Horde/Kolab/Storage/Unit/ObjectTest.php | 20 ++++++++------------
+ .../test/Horde/Push/Unit/Push/Recipient/MailTest.php | 2 +-
+ 3 files changed, 10 insertions(+), 14 deletions(-)
+
+diff --git a/framework/Kolab_Storage/test/Horde/Kolab/Storage/Unit/ObjectTest.php b/framework/Kolab_Storage/test/Horde/Kolab/Storage/Unit/ObjectTest.php
+index 9ca5ebb..3b3381f 100644
+--- a/framework/Kolab_Storage/test/Horde/Kolab/Storage/Unit/ObjectTest.php
++++ b/framework/Kolab_Storage/test/Horde/Kolab/Storage/Unit/ObjectTest.php
+@@ -71,9 +71,8 @@ public function testObjectTypeDeviatesFromFolderType()
+ $data = $this->getMock('Horde_Kolab_Storage_Object_Writer');
+ $object = new Horde_Kolab_Storage_Object();
+ $headers = $this->getMock('Horde_Mime_Headers');
+- $headers->expects($this->once())
+- ->method('getValue')
+- ->with('X-Kolab-Type')
++ $headers->method('__call')
++ ->with('getValue', array('X-Kolab-Type'))
+ ->will($this->returnValue('application/x-vnd.kolab.note'));
+ $this->folder->expects($this->once())
+ ->method('getType')
+@@ -100,9 +99,8 @@ public function testMissingKolabPart()
+ $data = $this->getMock('Horde_Kolab_Storage_Object_Writer');
+ $object = new Horde_Kolab_Storage_Object();
+ $headers = $this->getMock('Horde_Mime_Headers');
+- $headers->expects($this->once())
+- ->method('getValue')
+- ->with('X-Kolab-Type')
++ $headers->method('__call')
++ ->with('getValue', array('X-Kolab-Type'))
+ ->will($this->returnValue('application/x-vnd.kolab.note'));
+ $this->folder->expects($this->once())
+ ->method('getType')
+@@ -137,9 +135,8 @@ public function testObjectRetainsHeadersIfLoaded()
+ $data = $this->getMock('Horde_Kolab_Storage_Object_Writer');
+ $object = new Horde_Kolab_Storage_Object();
+ $headers = $this->getMock('Horde_Mime_Headers');
+- $headers->expects($this->once())
+- ->method('getValue')
+- ->with('X-Kolab-Type')
++ $headers->method('__call')
++ ->with('getValue', array('X-Kolab-Type'))
+ ->will($this->returnValue('application/x-vnd.kolab.note'));
+ $this->folder->expects($this->once())
+ ->method('getType')
+@@ -326,9 +323,8 @@ public function testSerializeUnserializeRetainsErrors()
+ $data = $this->getMock('Horde_Kolab_Storage_Object_Writer');
+ $object = new Horde_Kolab_Storage_Object();
+ $headers = $this->getMock('Horde_Mime_Headers');
+- $headers->expects($this->once())
+- ->method('getValue')
+- ->with('X-Kolab-Type')
++ $headers->method('__call')
++ ->with('getValue', array('X-Kolab-Type'))
+ ->will($this->returnValue('application/x-vnd.kolab.note'));
+ $this->folder->expects($this->once())
+ ->method('getType')
+From c6e85ba158ec4b7cc9d2c22f592aaffaee7751de Mon Sep 17 00:00:00 2001
+From: Michael M Slusarz <slusarz@horde.org>
+Date: Thu, 20 Nov 2014 17:09:45 -0700
+Subject: [PATCH] Fix test
+
+---
+ .../Storage/ComponentTest/Data/Object/Message/ModifiedTest.php | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/framework/Kolab_Storage/test/Horde/Kolab/Storage/ComponentTest/Data/Object/Message/ModifiedTest.php b/framework/Kolab_Storage/test/Horde/Kolab/Storage/ComponentTest/Data/Object/Message/ModifiedTest.php
+index d8b6551..bf00433 100644
+--- a/framework/Kolab_Storage/test/Horde/Kolab/Storage/ComponentTest/Data/Object/Message/ModifiedTest.php
++++ b/framework/Kolab_Storage/test/Horde/Kolab/Storage/ComponentTest/Data/Object/Message/ModifiedTest.php
+@@ -90,14 +90,14 @@ public function testStore()
+ User-Agent: Horde::Kolab::Storage v@version@
+ MIME-Version: 1.0
+ X-Kolab-Type: application/x-vnd.kolab.note
+-Content-Type: multipart/mixed; boundary="";
+- name="Kolab Groupware Data"
++Content-Type: multipart/mixed; name="Kolab Groupware Data";
++ boundary=""
+ Content-Disposition: attachment; filename="Kolab Groupware Data"
+
+ This message is in MIME format.
+
+ --=_
+-Content-Type: text/plain; charset=utf-8; name="Kolab Groupware Information"
++Content-Type: text/plain; name="Kolab Groupware Information"; charset=utf-8
+ Content-Disposition: inline; filename="Kolab Groupware Information"
+
+ This is a Kolab Groupware object. To view this object you will need an email
diff --git a/php-horde-Horde-Kolab-Storage.spec b/php-horde-Horde-Kolab-Storage.spec
index bde5ac8..07cac7f 100644
--- a/php-horde-Horde-Kolab-Storage.spec
+++ b/php-horde-Horde-Kolab-Storage.spec
@@ -12,7 +12,7 @@
Name: php-horde-Horde-Kolab-Storage
Version: 2.1.1
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: A package for handling Kolab data stored on an IMAP server
Group: Development/Libraries
@@ -20,6 +20,8 @@ License: LGPLv2
URL: http://%{pear_channel}
Source0: http://%{pear_channel}/get/%{pear_name}-%{version}.tgz
+Patch0: %{pear_name}-upstream.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: gettext
@@ -77,11 +79,14 @@ to deal with this type of data storage effectively.
%setup -q -c
cd %{pear_name}-%{version}
+%patch0 -p3 -b .upstream
+
# Don't install .po and .pot files
# Remove checksum for .mo, as we regenerate them
sed -e '/%{pear_name}.po/d' \
-e '/Horde_Other.po/d' \
-e '/%{pear_name}.mo/s/md5sum=.*name=/name=/' \
+ -e '/test/s/md5sum=.*name=/name=/' \
../package.xml >%{name}.xml
touch -r ../package.xml %{name}.xml
@@ -163,6 +168,9 @@ fi
%changelog
+* Tue Nov 25 2014 Remi Collet <remi@fedoraproject.org> - 2.1.1-2
+- add suptream patch for test (thanks Koschei)
+
* Sat Aug 30 2014 Remi Collet <remi@fedoraproject.org> - 2.1.1-1
- Update to 2.1.1