16 $this->assertNull($principal->getHref());
20 $this->assertNull($principal->getHref());
24 $this->assertEquals(
'admin/', $principal->getHref());
47 $this->assertXmlStringEqualsXmlString(
' 48 <d:principal xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns"> 50 </d:principal>',
$xml);
63 $this->assertXmlStringEqualsXmlString(
' 64 <d:principal xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns"> 66 </d:principal>',
$xml);
77 $xml = (
new DAV\Server())->xml->write(
'{DAV:}principal', $prin,
'/');
79 $this->assertXmlStringEqualsXmlString(
' 80 <d:principal xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns"> 81 <d:href>/principals/admin/</d:href> 82 </d:principal>',
$xml);
88 $xml =
'<?xml version="1.0"?> 89 <d:principal xmlns:d="DAV:">' .
90 '<d:href>/principals/admin</d:href>' .
95 $this->assertEquals(
'/principals/admin/', $principal->getHref());
101 $xml =
'<?xml version="1.0"?> 102 <d:principal xmlns:d="DAV:">' .
103 ' <d:authenticated />' .
113 $xml =
'<?xml version="1.0"?> 114 <d:principal xmlns:d="DAV:">' .
115 ' <d:unauthenticated />' .
128 $xml =
'<?xml version="1.0"?> 129 <d:principal xmlns:d="DAV:">' .
140 $reader->elementMap[
'{DAV:}principal'] =
'Sabre\\DAVACL\\Xml\\Property\\Principal';
155 $this->assertXmlStringEqualsXmlString(
172 '<em>unauthenticated</em>',
176 '<em>authenticated</em>',
184 '<a href="/principals/admin/">/principals/admin/</a>',
testUnserializeUnknown()
Sabre
testUnserializeAuthenticated()
testNoHref()
testSimple Sabre
htmlProvider()
Provides data for the html tests.
testSerializeHref()
testSerializeUnAuthenticated
const ALL
Everybody, basically.
const UNAUTHENTICATED
To specify a not-logged-in user, use the UNAUTHENTICATED principal.
The Reader class expands upon PHP's built-in XMLReader.
const AUTHENTICATED
To specify any principal that is logged in, use AUTHENTICATED.
testSerializeAuthenticated()
testSerializeUnAuthenticated
testSerializeUnAuthenticated()
testSimple
testUnserializeUnauthenticated()
const HREF
Specific principals can be specified with the HREF.
testToHtml($principal, $output)
testSimple htmlProvider
This class provides a few utility functions for easily generating HTML for the browser plugin...