summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2015-03-16 07:35:01 +0100
committerRemi Collet <fedora@famillecollet.com>2015-03-16 07:35:01 +0100
commitf19d7b4cfa22739cec85fb0019e8c59cff3a51f4 (patch)
tree8d25ea2cac00661e2f7136b4a0425c74285a804a
parent7953579ee2057f844a73a166d4b77363dae6fd7c (diff)
php-horde-Horde-Kolab-Storage: upstream patch for test suite
-rw-r--r--Horde_Kolab_Storage-upstream.patch130
-rw-r--r--php-horde-Horde-Kolab-Storage.spec11
2 files changed, 140 insertions, 1 deletions
diff --git a/Horde_Kolab_Storage-upstream.patch b/Horde_Kolab_Storage-upstream.patch
new file mode 100644
index 0000000..bbc630b
--- /dev/null
+++ b/Horde_Kolab_Storage-upstream.patch
@@ -0,0 +1,130 @@
+From 9ac03eb9986f297753bbd15fd4191f0fa3f44c5b Mon Sep 17 00:00:00 2001
+From: Michael M Slusarz <slusarz@horde.org>
+Date: Thu, 22 Jan 2015 02:58:15 -0700
+Subject: [PATCH] Fix tests
+
+These tests should really be fixed another way... since there is no need
+to be testing MIME formatting (since parameter order and case are
+never guaranteed).
+---
+ .../Storage/ComponentTest/Data/Object/Message/ModifiedTest.php | 6 +++---
+ .../Kolab/Storage/ComponentTest/Data/Object/Message/NewTest.php | 2 +-
+ .../Kolab_Storage/test/Horde/Kolab/Storage/Unit/ObjectTest.php | 2 +-
+ 3 files changed, 5 insertions(+), 5 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 8e92d22..0d74f0e 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; name="Kolab Groupware Data";
+- boundary=""
++Content-Type: multipart/mixed; boundary="";
++ name="Kolab Groupware Data"
+ Content-Disposition: attachment; filename="Kolab Groupware Data"
+
+ This message is in MIME format.
+
+ --=_
+-Content-Type: text/plain; name="Kolab Groupware Information"; charset=utf-8
++Content-Type: text/plain; charset=utf-8; name="Kolab Groupware Information"
+ 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/framework/Kolab_Storage/test/Horde/Kolab/Storage/ComponentTest/Data/Object/Message/NewTest.php b/framework/Kolab_Storage/test/Horde/Kolab/Storage/ComponentTest/Data/Object/Message/NewTest.php
+index 77fed33..65bc135 100644
+--- a/framework/Kolab_Storage/test/Horde/Kolab/Storage/ComponentTest/Data/Object/Message/NewTest.php
++++ b/framework/Kolab_Storage/test/Horde/Kolab/Storage/ComponentTest/Data/Object/Message/NewTest.php
+@@ -96,7 +96,7 @@ public function testStore()
+ This message is in MIME format.
+
+ --=_
+-Content-Type: text/plain; name="Kolab Groupware Information"; charset=utf-8
++Content-Type: text/plain; charset=utf-8; name="Kolab Groupware Information"
+ Content-Disposition: inline; filename="Kolab Groupware Information"
+
+ This is a Kolab Groupware object. To view this object you will need an email client that understands the Kolab Groupware format. For a list of such email clients please visit http://www.kolab.org/content/kolab-clients
+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 c388a71..3b82be8 100644
+--- a/framework/Kolab_Storage/test/Horde/Kolab/Storage/Unit/ObjectTest.php
++++ b/framework/Kolab_Storage/test/Horde/Kolab/Storage/Unit/ObjectTest.php
+@@ -573,7 +573,7 @@ public function testEnvelope()
+
+ $this->assertContains('Content-Disposition: attachment; filename="Kolab Groupware Data"', $driver->messages['INBOX'][0]);
+ $this->assertContains('Content-Type: multipart/mixed;', $driver->messages['INBOX'][0]);
+- $this->assertContains('Content-Type: text/plain; name="Kolab Groupware Information"; charset=utf-8', $driver->messages['INBOX'][0]);
++ $this->assertContains('Content-Type: text/plain; charset=utf-8; name="Kolab Groupware Information"', $driver->messages['INBOX'][0]);
+ $this->assertContains('Content-Disposition: inline; filename="Kolab Groupware Information"', $driver->messages['INBOX'][0]);
+ $this->assertContains(
+ "This is a Kolab Groupware object. To view this object you will need an email client that understands the Kolab Groupware format. For a list of such email clients please visit http://www.kolab.org/content/kolab-clients",
+From 07b140ddcd32fc513b49caa0a857fe1a043809e9 Mon Sep 17 00:00:00 2001
+From: Michael M Slusarz <slusarz@horde.org>
+Date: Mon, 9 Feb 2015 23:12:57 -0700
+Subject: [PATCH] Fix unit tests
+
+---
+ .../Storage/ComponentTest/Data/Object/Message/ModifiedTest.php | 10 ++--------
+ .../Storage/ComponentTest/Data/Object/Message/NewTest.php | 10 ++--------
+ 2 files changed, 4 insertions(+), 16 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 0d74f0e..e5390af 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
+@@ -32,11 +32,6 @@ class Horde_Kolab_Storage_ComponentTest_Data_Object_Message_ModifiedTest
+ {
+ public function testStore()
+ {
+- if (version_compare(PHP_VERSION, '5.5.0', '>=') &&
+- version_compare(PHP_VERSION, '5.5.3', '<=')) {
+- $this->markTestSkipped('PHP version with broken quoted-printable-encode');
+- }
+-
+ $driver = new Horde_Kolab_Storage_Stub_Driver('user');
+ $driver->setMessage('INBOX', 1, file_get_contents(__DIR__ . '/../../../../fixtures/note.eml'));
+ $factory = new Horde_Kolab_Format_Factory();
+@@ -106,10 +101,9 @@ public function testStore()
+ --=_
+ Content-Type: application/x-vnd.kolab.note; name=kolab.xml
+ Content-Disposition: inline; x-kolab-type=xml; filename=kolab.xml
+-Content-Transfer-Encoding: quoted-printable
+
+-<?xml version=3D"1.0" encoding=3D"UTF-8"?>
+-<note version=3D"1.0">
++<?xml version="1.0" encoding="UTF-8"?>
++<note version="1.0">
+ <uid>ABC1234</uid>
+ <body/>
+ <categories/>
+diff --git a/framework/Kolab_Storage/test/Horde/Kolab/Storage/ComponentTest/Data/Object/Message/NewTest.php b/framework/Kolab_Storage/test/Horde/Kolab/Storage/ComponentTest/Data/Object/Message/NewTest.php
+index 65bc135..7359056 100644
+--- a/framework/Kolab_Storage/test/Horde/Kolab/Storage/ComponentTest/Data/Object/Message/NewTest.php
++++ b/framework/Kolab_Storage/test/Horde/Kolab/Storage/ComponentTest/Data/Object/Message/NewTest.php
+@@ -32,11 +32,6 @@ class Horde_Kolab_Storage_ComponentTest_Data_Object_Message_NewTest
+ {
+ public function testStore()
+ {
+- if (version_compare(PHP_VERSION, '5.5.0', '>=') &&
+- version_compare(PHP_VERSION, '5.5.3', '<=')) {
+- $this->markTestSkipped('PHP version with broken quoted-printable-encode');
+- }
+-
+ setlocale(LC_MESSAGES, 'C');
+ $factory = new Horde_Kolab_Format_Factory();
+ $writer = new Horde_Kolab_Storage_Object_Writer_Format(
+@@ -103,10 +98,9 @@ public function testStore()
+ --=_
+ Content-Type: application/x-vnd.kolab.note; name=kolab.xml
+ Content-Disposition: inline; x-kolab-type=xml; filename=kolab.xml
+-Content-Transfer-Encoding: quoted-printable
+
+-<?xml version=3D"1.0" encoding=3D"UTF-8"?>
+-<note version=3D"1.0">
++<?xml version="1.0" encoding="UTF-8"?>
++<note version="1.0">
+ <uid>ABC1234</uid>
+ <body></body>
+ <categories></categories>
diff --git a/php-horde-Horde-Kolab-Storage.spec b/php-horde-Horde-Kolab-Storage.spec
index df8e662..5904c52 100644
--- a/php-horde-Horde-Kolab-Storage.spec
+++ b/php-horde-Horde-Kolab-Storage.spec
@@ -2,7 +2,7 @@
#
# Copyright (c) 2013-2015 Remi Collet
# License: CC-BY-SA
-# http://creativecommons.org/licenses/by-sa/3.0/
+# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
@@ -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
@@ -74,15 +76,19 @@ Storing user data in an IMAP account belonging to the user is one of the
Kolab server core concepts. This package provides all the necessary means
to deal with this type of data storage effectively.
+
%prep
%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 '/role="test"/s/md5sum=.*name=/name=/' \
../package.xml >%{name}.xml
touch -r ../package.xml %{name}.xml
@@ -160,6 +166,9 @@ fi
%changelog
+* Mon Mar 16 2015 Remi Collet <remi@fedoraproject.org> - 2.1.2-2
+- add upstream patch for test suite, thanks Koschei
+
* Fri Jan 09 2015 Remi Collet <remi@fedoraproject.org> - 2.1.2-1
- Update to 2.1.2
- add provides php-composer(horde/horde-kolab-storage)