ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
AceConflictTest.php
Go to the documentation of this file.
1
<?
php
2
3
namespace
Sabre\DAVACL\Exception
;
4
5
use
Sabre\DAV
;
6
7
class
AceConflictTest
extends
\PHPUnit_Framework_TestCase
{
8
9
function
testSerialize
() {
10
11
$ex =
new
AceConflict
(
'message'
);
12
13
$server
=
new
DAV\Server
();
14
$dom = new \DOMDocument(
'1.0'
,
'utf-8'
);
15
$root
= $dom->createElementNS(
'DAV:'
,
'd:root'
);
16
$dom->appendChild(
$root
);
17
18
$ex->serialize(
$server
,
$root
);
19
20
$xpaths = [
21
'/d:root'
=> 1,
22
'/d:root/d:no-ace-conflict'
=> 1,
23
];
24
25
// Reloading because PHP DOM sucks
26
$dom2 = new \DOMDocument(
'1.0'
,
'utf-8'
);
27
$dom2->loadXML($dom->saveXML());
28
29
$dxpath = new \DOMXPath($dom2);
30
$dxpath->registerNamespace(
'd'
,
'DAV:'
);
31
foreach
($xpaths as $xpath => $count) {
32
33
$this->assertEquals($count, $dxpath->query($xpath)->length,
'Looking for : '
. $xpath .
', we could only find '
. $dxpath->query($xpath)->length .
' elements, while we expected '
. $count);
34
35
}
36
37
}
38
39
}
Sabre\DAV
Sabre\DAVACL\Exception
Definition:
AceConflict.php:3
Sabre\DAVACL\Exception\AceConflictTest\testSerialize
testSerialize()
Definition:
AceConflictTest.php:9
PHPUnit_Framework_TestCase
$server
$server
Definition:
sabredav.php:48
Sabre\DAVACL\Exception\AceConflict
This exception is thrown when a client attempts to set conflicting permissions.
Definition:
AceConflict.php:15
Sabre\DAV\Server
Main DAV server class.
Definition:
Server.php:23
$root
$root
Definition:
sabredav.php:45
Sabre\DAVACL\Exception\AceConflictTest
Definition:
AceConflictTest.php:7
php
libs
composer
vendor
sabre
dav
tests
Sabre
DAVACL
Exception
AceConflictTest.php
Generated on Thu Jan 16 2025 19:01:52 for ILIAS by
1.8.13 (using
Doxyfile
)