JCalTransformTest
extends DAVServerTest
in package
Uses
PHPUnitAssertions
This class may be used as a basis for other webdav-related unittests.
This class is supposed to provide a reasonably big framework to quickly get a testing environment running.
Table of Contents
- $aclPlugin : Plugin
- $authPlugin : Plugin
- $autoLogin : mixed
- If this string is set, we will automatically log in the user with this name.
- $caldavBackend : mixed
- $caldavCalendarObjects : mixed
- $caldavCalendars : mixed
- An array with calendars. Every calendar should have - principaluri - uri.
- $caldavICSExportPlugin : ICSExportPlugin
- $caldavPlugin : Plugin
- $caldavSchedulePlugin : Plugin
- CalDAV scheduling plugin.
- $caldavSharingPlugin : SharingPlugin
- $carddavAddressBooks : mixed
- $carddavBackend : mixed
- $carddavCards : mixed
- $carddavPlugin : Plugin
- $locksBackend : mixed
- $locksPlugin : Plugin
- $principalBackend : mixed
- $propertyStorageBackend : mixed
- $propertyStoragePlugin : mixed
- $server : Server
- $setupACL : mixed
- $setupCalDAV : mixed
- $setupCalDAVICSExport : mixed
- $setupCalDAVScheduling : mixed
- $setupCalDAVSharing : mixed
- $setupCalDAVSubscriptions : mixed
- $setupCardDAV : mixed
- $setupFiles : mixed
- $setupLocks : mixed
- $setupPropertyStorage : mixed
- $setupSharing : mixed
- $sharingPlugin : Plugin
- Sharing plugin.
- $tree : mixed
- assertHttpStatus() : mixed
- assertVObjectEqualsVObject() : mixed
- This method tests whether two vcards or icalendar objects are semantically identical.
- autoLogin() : mixed
- 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.
- initializeEverything() : mixed
- request() : Response
- Makes a request, and returns a response object.
- setup() : void
- setUpBackends() : mixed
- setUpTree() : mixed
- Override this to provide your own Tree for your test-case.
- testCalendarQueryDepth0() : mixed
- testCalendarQueryDepth1() : mixed
- testGet() : mixed
- testMultiGet() : mixed
- testValidateICalendar() : mixed
Properties
$aclPlugin
protected
Plugin
$aclPlugin
$authPlugin
protected
Plugin
$authPlugin
$autoLogin
If this string is set, we will automatically log in the user with this name.
protected
mixed
$autoLogin
= null
$caldavBackend
protected
mixed
$caldavBackend
$caldavCalendarObjects
protected
mixed
$caldavCalendarObjects
= [1 => ['bar.ics' => ['uri' => 'bar.ics', 'calendarid' => 1, 'calendardata' => "BEGIN:VCALENDAR
BEGIN:VEVENT
END:VEVENT
END:VCALENDAR
", 'lastmodified' => null]]]
$caldavCalendars
An array with calendars. Every calendar should have - principaluri - uri.
protected
mixed
$caldavCalendars
= [['id' => 1, 'principaluri' => 'principals/user1', 'uri' => 'foo']]
$caldavICSExportPlugin
protected
ICSExportPlugin
$caldavICSExportPlugin
$caldavPlugin
protected
Plugin
$caldavPlugin
$caldavSchedulePlugin
CalDAV scheduling plugin.
protected
Plugin
$caldavSchedulePlugin
$caldavSharingPlugin
protected
SharingPlugin
$caldavSharingPlugin
$carddavAddressBooks
protected
mixed
$carddavAddressBooks
= []
$carddavBackend
protected
mixed
$carddavBackend
$carddavCards
protected
mixed
$carddavCards
= []
$carddavPlugin
protected
Plugin
$carddavPlugin
$locksBackend
protected
mixed
$locksBackend
$locksPlugin
protected
Plugin
$locksPlugin
$principalBackend
protected
mixed
$principalBackend
$propertyStorageBackend
protected
mixed
$propertyStorageBackend
$propertyStoragePlugin
protected
mixed
$propertyStoragePlugin
$server
protected
Server
$server
$setupACL
protected
mixed
$setupACL
= false
$setupCalDAV
protected
mixed
$setupCalDAV
= true
$setupCalDAVICSExport
protected
mixed
$setupCalDAVICSExport
= false
$setupCalDAVScheduling
protected
mixed
$setupCalDAVScheduling
= false
$setupCalDAVSharing
protected
mixed
$setupCalDAVSharing
= false
$setupCalDAVSubscriptions
protected
mixed
$setupCalDAVSubscriptions
= false
$setupCardDAV
protected
mixed
$setupCardDAV
= false
$setupFiles
protected
mixed
$setupFiles
= false
$setupLocks
protected
mixed
$setupLocks
= false
$setupPropertyStorage
protected
mixed
$setupPropertyStorage
= false
$setupSharing
protected
mixed
$setupSharing
= false
$sharingPlugin
Sharing plugin.
protected
Plugin
$sharingPlugin
$tree
protected
mixed
$tree
= []
Methods
assertHttpStatus()
public
assertHttpStatus(mixed $expectedStatus, Request $req) : mixed
Parameters
- $expectedStatus : mixed
- $req : Request
Return values
mixed —assertVObjectEqualsVObject()
This method tests whether two vcards or icalendar objects are semantically identical.
public
assertVObjectEqualsVObject(resource|string|Component $expected, resource|string|Component $actual[, string $message = '' ]) : mixed
It supports objects being supplied as strings, streams or Sabre\VObject\Component instances.
PRODID is removed from both objects as this is often changes and would just get in the way.
CALSCALE will automatically get removed if it's set to GREGORIAN.
Any property that has the value ANY will be treated as a wildcard.
Parameters
Return values
mixed —autoLogin()
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.
public
autoLogin(string $userName) : mixed
Parameters
- $userName : string
Return values
mixed —initializeEverything()
public
initializeEverything() : mixed
Return values
mixed —request()
Makes a request, and returns a response object.
public
request(array<string|int, mixed>|Request $request[, int $expectedStatus = null ]) : Response
You can either pass an instance of Sabre\HTTP\Request, or an array, which will then be used as the _SERVER array.
If $expectedStatus is set, we'll compare it with the HTTP status of the returned response. If it doesn't match, we'll immediately fail the test.
Parameters
- $request : array<string|int, mixed>|Request
- $expectedStatus : int = null
Return values
Response —setup()
public
setup() : void
Return values
void —setUpBackends()
public
setUpBackends() : mixed
Return values
mixed —setUpTree()
Override this to provide your own Tree for your test-case.
public
setUpTree() : mixed
Return values
mixed —testCalendarQueryDepth0()
public
testCalendarQueryDepth0() : mixed
Return values
mixed —testCalendarQueryDepth1()
public
testCalendarQueryDepth1() : mixed
Return values
mixed —testGet()
public
testGet() : mixed
Return values
mixed —testMultiGet()
public
testMultiGet() : mixed
Return values
mixed —testValidateICalendar()
public
testValidateICalendar() : mixed