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