aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/tests/Sabre/DAV/Property/HrefTest.php
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-05-10 17:26:44 -0700
committerredmatrix <git@macgirvin.com>2016-05-10 17:26:44 -0700
commit0b02a6d123b2014705998c94ddf3d460948d3eac (patch)
tree78ff2cab9944a4f5ab3f80ec93cbe1120de90bb2 /vendor/sabre/dav/tests/Sabre/DAV/Property/HrefTest.php
parent40b5b6e9d2da7ab65c8b4d38cdceac83a4d78deb (diff)
downloadvolse-hubzilla-0b02a6d123b2014705998c94ddf3d460948d3eac.tar.gz
volse-hubzilla-0b02a6d123b2014705998c94ddf3d460948d3eac.tar.bz2
volse-hubzilla-0b02a6d123b2014705998c94ddf3d460948d3eac.zip
initial sabre upgrade (needs lots of work - to wit: authentication, redo the browser interface, and rework event export/import)
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/DAV/Property/HrefTest.php')
-rw-r--r--vendor/sabre/dav/tests/Sabre/DAV/Property/HrefTest.php119
1 files changed, 0 insertions, 119 deletions
diff --git a/vendor/sabre/dav/tests/Sabre/DAV/Property/HrefTest.php b/vendor/sabre/dav/tests/Sabre/DAV/Property/HrefTest.php
deleted file mode 100644
index e5607f51b..000000000
--- a/vendor/sabre/dav/tests/Sabre/DAV/Property/HrefTest.php
+++ /dev/null
@@ -1,119 +0,0 @@
-<?php
-
-namespace Sabre\DAV\Property;
-
-use Sabre\DAV;
-
-class HrefTest extends \PHPUnit_Framework_TestCase {
-
- function testConstruct() {
-
- $href = new Href('path');
- $this->assertEquals('path',$href->getHref());
-
- }
-
- function testSerialize() {
-
- $href = new Href('path');
- $this->assertEquals('path',$href->getHref());
-
- $doc = new \DOMDocument();
- $root = $doc->createElement('d:anything');
- $root->setAttribute('xmlns:d','DAV:');
-
- $doc->appendChild($root);
- $server = new DAV\Server();
- $server->setBaseUri('/bla/');
-
- $href->serialize($server, $root);
-
- $xml = $doc->saveXML();
-
- $this->assertEquals(
-'<?xml version="1.0"?>
-<d:anything xmlns:d="DAV:"><d:href>/bla/path</d:href></d:anything>
-', $xml);
-
- }
-
- function testSerializeNoPrefix() {
-
- $href = new Href('path',false);
- $this->assertEquals('path',$href->getHref());
-
- $doc = new \DOMDocument();
- $root = $doc->createElement('d:anything');
- $root->setAttribute('xmlns:d','DAV:');
-
- $doc->appendChild($root);
- $server = new DAV\Server();
- $server->setBaseUri('/bla/');
-
- $href->serialize($server, $root);
-
- $xml = $doc->saveXML();
-
- $this->assertEquals(
-'<?xml version="1.0"?>
-<d:anything xmlns:d="DAV:"><d:href>path</d:href></d:anything>
-', $xml);
-
- }
-
- function testUnserialize() {
-
- $xml = '<?xml version="1.0"?>
-<d:anything xmlns:d="urn:DAV"><d:href>/bla/path</d:href></d:anything>
-';
-
- $dom = new \DOMDocument();
- $dom->loadXML($xml);
-
- $href = Href::unserialize($dom->firstChild);
- $this->assertEquals('/bla/path',$href->getHref());
-
- }
-
- function testUnserializeIncompatible() {
-
- $xml = '<?xml version="1.0"?>
-<d:anything xmlns:d="urn:DAV"><d:href2>/bla/path</d:href2></d:anything>
-';
-
- $dom = new \DOMDocument();
- $dom->loadXML($xml);
-
- $href = Href::unserialize($dom->firstChild);
- $this->assertNull($href);
-
- }
-
- /**
- * This method tests if hrefs containing & are correctly encoded.
- */
- function testSerializeEntity() {
-
- $href = new Href('http://example.org/?a&b', false);
- $this->assertEquals('http://example.org/?a&b',$href->getHref());
-
- $doc = new \DOMDocument();
- $root = $doc->createElement('d:anything');
- $root->setAttribute('xmlns:d','DAV:');
-
- $doc->appendChild($root);
- $server = new DAV\Server();
- $server->setBaseUri('/bla/');
-
- $href->serialize($server, $root);
-
- $xml = $doc->saveXML();
-
- $this->assertEquals(
-'<?xml version="1.0"?>
-<d:anything xmlns:d="DAV:"><d:href>http://example.org/?a&amp;b</d:href></d:anything>
-', $xml);
-
- }
-
-}