[Pkg-owncloud-commits] [php-sabredav] 22/148: Fixed unittests.

David Prévot taffit at moszumanska.debian.org
Wed Apr 15 01:37:04 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository php-sabredav.

commit d366b3d035a2d72986c41d3f84bcd86f9d1f6148
Author: Evert Pot <me at evertpot.com>
Date:   Fri Feb 6 21:25:21 2015 -0500

    Fixed unittests.
---
 tests/Sabre/DAVACL/Xml/Property/PrincipalTest.php  | 24 +++++-----
 .../Xml/Property/SupportedPrivilegeSetTest.php     | 56 +++++++++++-----------
 2 files changed, 40 insertions(+), 40 deletions(-)

diff --git a/tests/Sabre/DAVACL/Xml/Property/PrincipalTest.php b/tests/Sabre/DAVACL/Xml/Property/PrincipalTest.php
index 0108bbf..400d7de 100644
--- a/tests/Sabre/DAVACL/Xml/Property/PrincipalTest.php
+++ b/tests/Sabre/DAVACL/Xml/Property/PrincipalTest.php
@@ -43,10 +43,10 @@ class PrincipalTest extends \PHPUnit_Framework_TestCase {
 
         $xml = (new DAV\Server())->xml->write(['{DAV:}principal' => $prin]);
 
-        $this->assertEquals(
-'<d:principal xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">' .
-'<d:unauthenticated/>' .
-'</d:principal>', $xml);
+        $this->assertXmlStringEqualsXmlString('
+<d:principal xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
+<d:unauthenticated/>
+</d:principal>', $xml);
 
     }
 
@@ -59,10 +59,10 @@ class PrincipalTest extends \PHPUnit_Framework_TestCase {
         $prin = new Principal(Principal::AUTHENTICATED);
         $xml = (new DAV\Server())->xml->write(['{DAV:}principal' => $prin]);
 
-        $this->assertEquals(
-'<d:principal xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">' .
-'<d:authenticated/>' .
-'</d:principal>', $xml);
+        $this->assertXmlStringEqualsXmlString('
+<d:principal xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
+<d:authenticated/>
+</d:principal>', $xml);
 
     }
 
@@ -75,10 +75,10 @@ class PrincipalTest extends \PHPUnit_Framework_TestCase {
         $prin = new Principal(Principal::HREF,'principals/admin');
         $xml = (new DAV\Server())->xml->write(['{DAV:}principal' => $prin], '/');
 
-        $this->assertEquals(
-'<d:principal xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">' .
-'<d:href>/principals/admin/</d:href>' .
-'</d:principal>', $xml);
+        $this->assertXmlStringEqualsXmlString('
+<d:principal xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
+<d:href>/principals/admin/</d:href>
+</d:principal>', $xml);
 
     }
 
diff --git a/tests/Sabre/DAVACL/Xml/Property/SupportedPrivilegeSetTest.php b/tests/Sabre/DAVACL/Xml/Property/SupportedPrivilegeSetTest.php
index 038d971..946c2fc 100644
--- a/tests/Sabre/DAVACL/Xml/Property/SupportedPrivilegeSetTest.php
+++ b/tests/Sabre/DAVACL/Xml/Property/SupportedPrivilegeSetTest.php
@@ -28,14 +28,14 @@ class SupportedPrivilegeSetTest extends \PHPUnit_Framework_TestCase {
 
         $xml = (new DAV\Server())->xml->write(['{DAV:}supported-privilege-set' => $prop]);
 
-        $this->assertEquals(
-'<d:supported-privilege-set xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">' .
-'<d:supported-privilege>' .
-'<d:privilege>' .
-'<d:all/>' .
-'</d:privilege>' .
-'</d:supported-privilege>' .
-'</d:supported-privilege-set>', $xml);
+        $this->assertXmlStringEqualsXmlString('
+<d:supported-privilege-set xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
+  <d:supported-privilege>
+    <d:privilege>
+      <d:all/>
+    </d:privilege>
+  </d:supported-privilege>
+</d:supported-privilege-set>', $xml);
 
     }
 
@@ -60,26 +60,26 @@ class SupportedPrivilegeSetTest extends \PHPUnit_Framework_TestCase {
 
         $xml = (new DAV\Server())->xml->write(['{DAV:}supported-privilege-set' => $prop]);
 
-        $this->assertEquals(
-'<d:supported-privilege-set xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">' .
-'<d:supported-privilege>' .
-'<d:privilege>' .
-'<d:all/>' .
-'</d:privilege>' .
-'<d:abstract/>' .
-'<d:supported-privilege>' .
-'<d:privilege>' .
-'<d:read/>' .
-'</d:privilege>' .
-'</d:supported-privilege>' .
-'<d:supported-privilege>' .
-'<d:privilege>' .
-'<d:write/>' .
-'</d:privilege>' .
-'<d:description>booh</d:description>' .
-'</d:supported-privilege>' .
-'</d:supported-privilege>' .
-'</d:supported-privilege-set>', $xml);
+        $this->assertXmlStringEqualsXmlString('
+<d:supported-privilege-set xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
+ <d:supported-privilege>
+  <d:privilege>
+   <d:all/>
+  </d:privilege>
+  <d:abstract/>
+  <d:supported-privilege>
+   <d:privilege>
+    <d:read/>
+   </d:privilege>
+  </d:supported-privilege>
+  <d:supported-privilege>
+   <d:privilege>
+    <d:write/>
+   </d:privilege>
+  <d:description>booh</d:description>
+  </d:supported-privilege>
+ </d:supported-privilege>
+</d:supported-privilege-set>', $xml);
 
     }
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabredav.git



More information about the Pkg-owncloud-commits mailing list