ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Sabre\DAV\SyncTokenPropertyTest Class Reference
+ Inheritance diagram for Sabre\DAV\SyncTokenPropertyTest:
+ Collaboration diagram for Sabre\DAV\SyncTokenPropertyTest:

Public Member Functions

 testAlreadyThere1 ($name, $value)
 The assumption in these tests is that a PROPFIND is going on, and to fetch the sync-token, the event handler is just able to use the existing result. More...
 
 testRefetch ($name, $value)
 In these test-cases, the plugin is forced to do a local propfind to fetch the items. More...
 
 testNoData ()
 
 data ()
 
- Public Member Functions inherited from Sabre\DAVServerTest
 setUp ()
 
 initializeEverything ()
 
 request ($request, $expectedStatus=null)
 Makes a request, and returns a response object. More...
 
 autoLogin ($userName)
 This function takes a username and sets the server in a state where this user is logged in, and no longer requires an authentication check. More...
 
 setUpTree ()
 Override this to provide your own Tree for your test-case. More...
 
 setUpBackends ()
 
 assertHttpStatus ($expectedStatus, HTTP\Request $req)
 

Additional Inherited Members

- Protected Attributes inherited from Sabre\DAVServerTest
 $setupCalDAV = false
 
 $setupCardDAV = false
 
 $setupACL = false
 
 $setupCalDAVSharing = false
 
 $setupCalDAVScheduling = false
 
 $setupCalDAVSubscriptions = false
 
 $setupCalDAVICSExport = false
 
 $setupLocks = false
 
 $setupFiles = false
 
 $setupSharing = false
 
 $setupPropertyStorage = false
 
 $caldavCalendars = []
 An array with calendars. More...
 
 $caldavCalendarObjects = []
 
 $carddavAddressBooks = []
 
 $carddavCards = []
 
 $server
 
 $tree = []
 
 $caldavBackend
 
 $carddavBackend
 
 $principalBackend
 
 $locksBackend
 
 $propertyStorageBackend
 
 $caldavPlugin
 
 $carddavPlugin
 
 $aclPlugin
 
 $caldavSharingPlugin
 
 $caldavSchedulePlugin
 
 $authPlugin
 
 $locksPlugin
 
 $sharingPlugin
 
 $propertyStoragePlugin
 
 $autoLogin = null
 If this string is set, we will automatically log in the user with this name. More...
 

Detailed Description

Definition at line 5 of file SyncTokenPropertyTest.php.

Member Function Documentation

◆ data()

Sabre\DAV\SyncTokenPropertyTest::data ( )

Definition at line 87 of file SyncTokenPropertyTest.php.

87  {
88 
89  return [
90  [
91  '{http://sabredav.org/ns}sync-token',
92  "hello"
93  ],
94  [
95  '{DAV:}sync-token',
96  "hello"
97  ],
98  [
99  '{DAV:}sync-token',
100  new Xml\Property\Href(Sync\Plugin::SYNCTOKEN_PREFIX . "hello", false)
101  ]
102  ];
103 
104  }

◆ testAlreadyThere1()

Sabre\DAV\SyncTokenPropertyTest::testAlreadyThere1 (   $name,
  $value 
)

The assumption in these tests is that a PROPFIND is going on, and to fetch the sync-token, the event handler is just able to use the existing result.

Parameters
string$name
mixed$valuedata

Definition at line 17 of file SyncTokenPropertyTest.php.

References $name.

17  {
18 
19  $propFind = new PropFind('foo', [
20  '{http://calendarserver.org/ns/}getctag',
21  $name,
22  ]);
23 
24  $propFind->set($name, $value);
25  $corePlugin = new CorePlugin();
26  $corePlugin->propFindLate($propFind, new SimpleCollection('hi'));
27 
28  $this->assertEquals("hello", $propFind->get('{http://calendarserver.org/ns/}getctag'));
29 
30  }

◆ testNoData()

Sabre\DAV\SyncTokenPropertyTest::testNoData ( )

Definition at line 64 of file SyncTokenPropertyTest.php.

64  {
65 
66  $this->server->tree = new Tree(
67  new SimpleCollection('root', [
68  new Mock\PropertiesCollection(
69  'foo',
70  [],
71  []
72  )
73  ])
74  );
75 
76  $propFind = new PropFind('foo', [
77  '{http://calendarserver.org/ns/}getctag',
78  ]);
79 
80  $corePlugin = $this->server->getPlugin('core');
81  $corePlugin->propFindLate($propFind, new SimpleCollection('hi'));
82 
83  $this->assertNull($propFind->get('{http://calendarserver.org/ns/}getctag'));
84 
85  }

◆ testRefetch()

Sabre\DAV\SyncTokenPropertyTest::testRefetch (   $name,
  $value 
)

In these test-cases, the plugin is forced to do a local propfind to fetch the items.

Parameters
string$name
mixed$valuedata

Definition at line 41 of file SyncTokenPropertyTest.php.

References $name.

41  {
42 
43  $this->server->tree = new Tree(
44  new SimpleCollection('root', [
45  new Mock\PropertiesCollection(
46  'foo',
47  [],
48  [$name => $value]
49  )
50  ])
51  );
52  $propFind = new PropFind('foo', [
53  '{http://calendarserver.org/ns/}getctag',
54  $name,
55  ]);
56 
57  $corePlugin = $this->server->getPlugin('core');
58  $corePlugin->propFindLate($propFind, new SimpleCollection('hi'));
59 
60  $this->assertEquals("hello", $propFind->get('{http://calendarserver.org/ns/}getctag'));
61 
62  }

The documentation for this class was generated from the following file: