diff options
author | redmatrix <git@macgirvin.com> | 2016-05-10 17:26:44 -0700 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-05-10 17:26:44 -0700 |
commit | 0b02a6d123b2014705998c94ddf3d460948d3eac (patch) | |
tree | 78ff2cab9944a4f5ab3f80ec93cbe1120de90bb2 /vendor/sabre/dav/tests/Sabre/DAV/Property/GetLastModifiedTest.php | |
parent | 40b5b6e9d2da7ab65c8b4d38cdceac83a4d78deb (diff) | |
download | volse-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/GetLastModifiedTest.php')
-rw-r--r-- | vendor/sabre/dav/tests/Sabre/DAV/Property/GetLastModifiedTest.php | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/vendor/sabre/dav/tests/Sabre/DAV/Property/GetLastModifiedTest.php b/vendor/sabre/dav/tests/Sabre/DAV/Property/GetLastModifiedTest.php deleted file mode 100644 index de8ca1283..000000000 --- a/vendor/sabre/dav/tests/Sabre/DAV/Property/GetLastModifiedTest.php +++ /dev/null @@ -1,75 +0,0 @@ -<?php - -namespace Sabre\DAV\Property; - -use Sabre\DAV; -use Sabre\HTTP; - -class GetLastModifiedTest extends \PHPUnit_Framework_TestCase { - - function testConstructDateTime() { - - $dt = new \DateTime('2010-03-14 16:35', new \DateTimeZone('UTC')); - $lastMod = new GetLastModified($dt); - $this->assertEquals($dt->format(\DateTime::ATOM), $lastMod->getTime()->format(\DateTime::ATOM)); - - } - - function testConstructString() { - - $dt = new \DateTime('2010-03-14 16:35', new \DateTimeZone('UTC')); - $lastMod = new GetLastModified('2010-03-14 16:35'); - $this->assertEquals($dt->format(\DateTime::ATOM), $lastMod->getTime()->format(\DateTime::ATOM)); - - } - - function testConstructInt() { - - $dt = new \DateTime('2010-03-14 16:35', new \DateTimeZone('UTC')); - $lastMod = new GetLastModified((int)$dt->format('U')); - $this->assertEquals($dt->format(\DateTime::ATOM), $lastMod->getTime()->format(\DateTime::ATOM)); - - } - - function testSerialize() { - - $dt = new \DateTime('2010-03-14 16:35', new \DateTimeZone('UTC')); - $lastMod = new GetLastModified($dt); - - $doc = new \DOMDocument(); - $root = $doc->createElement('d:getlastmodified'); - $root->setAttribute('xmlns:d','DAV:'); - - $doc->appendChild($root); - $server = new DAV\Server(); - - $lastMod->serialize($server, $root); - - $xml = $doc->saveXML(); - - /* - $this->assertEquals( -'<?xml version="1.0"?> -<d:getlastmodified xmlns:d="DAV:" xmlns:b="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/" b:dt="dateTime.rfc1123">' . -HTTP\Util::toHTTPDate($dt) . -'</d:getlastmodified> -', $xml); - */ - $this->assertEquals( -'<?xml version="1.0"?> -<d:getlastmodified xmlns:d="DAV:">' . -HTTP\Util::toHTTPDate($dt) . -'</d:getlastmodified> -', $xml); - - $ok = false; - try { - GetLastModified::unserialize(DAV\XMLUtil::loadDOMDocument($xml)->firstChild); - } catch (DAV\Exception $e) { - $ok = true; - } - if (!$ok) $this->markTestFailed('Unserialize should not be supported'); - - } - -} |