From 6bfdffba511e29d3c661a0e08c6628e6ce271264 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 25 Nov 2014 10:42:28 +0100 Subject: php-horde-Horde-Mime: add upstream patch for tests --- Horde_Kolab_Storage-upstream.patch | 94 ++++++++++++++++++++++++++++++++++++++ php-horde-Horde-Kolab-Storage.spec | 10 +++- 2 files changed, 103 insertions(+), 1 deletion(-) create mode 100644 Horde_Kolab_Storage-upstream.patch 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 +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 +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 - 2.1.1-2 +- add suptream patch for test (thanks Koschei) + * Sat Aug 30 2014 Remi Collet - 2.1.1-1 - Update to 2.1.1 -- cgit