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

Public Member Functions

 testPostPassThruNotFound ()
 
 testPostPassThruNotTextCalendar ()
 
 testPostPassThruNoOutBox ()
 
 testInvalidIcalBody ()
 
 testNoVEVENT ()
 
 testNoMETHOD ()
 
 testUnsupportedMethod ()
 
- 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)
 

Protected Attributes

 $setupCalDAV = true
 
 $setupACL = true
 
 $autoLogin = 'user1'
 
 $setupCalDAVScheduling = true
 
- 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 7 of file OutboxPostTest.php.

Member Function Documentation

◆ testInvalidIcalBody()

Sabre\CalDAV\Schedule\OutboxPostTest::testInvalidIcalBody ( )

Definition at line 49 of file OutboxPostTest.php.

References $req, and Sabre\HTTP\Sapi\createFromServerArray().

49  {
50 
52  'REQUEST_METHOD' => 'POST',
53  'REQUEST_URI' => '/calendars/user1/outbox',
54  'HTTP_ORIGINATOR' => 'mailto:user1.sabredav@sabredav.org',
55  'HTTP_RECIPIENT' => 'mailto:user2@example.org',
56  'HTTP_CONTENT_TYPE' => 'text/calendar',
57  ]);
58  $req->setBody('foo');
59 
60  $this->assertHTTPStatus(400, $req);
61 
62  }
$req
Definition: getUserInfo.php:20
static createFromServerArray(array $serverArray)
This static method will create a new Request object, based on a PHP $_SERVER array.
Definition: Sapi.php:107
+ Here is the call graph for this function:

◆ testNoMETHOD()

Sabre\CalDAV\Schedule\OutboxPostTest::testNoMETHOD ( )

Definition at line 87 of file OutboxPostTest.php.

References $req, and Sabre\HTTP\Sapi\createFromServerArray().

87  {
88 
90  'REQUEST_METHOD' => 'POST',
91  'REQUEST_URI' => '/calendars/user1/outbox',
92  'HTTP_ORIGINATOR' => 'mailto:user1.sabredav@sabredav.org',
93  'HTTP_RECIPIENT' => 'mailto:user2@example.org',
94  'HTTP_CONTENT_TYPE' => 'text/calendar',
95  ]);
96 
97  $body = [
98  'BEGIN:VCALENDAR',
99  'BEGIN:VEVENT',
100  'END:VEVENT',
101  'END:VCALENDAR',
102  ];
103 
104  $req->setBody(implode("\r\n", $body));
105 
106  $this->assertHTTPStatus(400, $req);
107 
108  }
$req
Definition: getUserInfo.php:20
static createFromServerArray(array $serverArray)
This static method will create a new Request object, based on a PHP $_SERVER array.
Definition: Sapi.php:107
+ Here is the call graph for this function:

◆ testNoVEVENT()

Sabre\CalDAV\Schedule\OutboxPostTest::testNoVEVENT ( )

Definition at line 64 of file OutboxPostTest.php.

References $req, and Sabre\HTTP\Sapi\createFromServerArray().

64  {
65 
67  'REQUEST_METHOD' => 'POST',
68  'REQUEST_URI' => '/calendars/user1/outbox',
69  'HTTP_ORIGINATOR' => 'mailto:user1.sabredav@sabredav.org',
70  'HTTP_RECIPIENT' => 'mailto:user2@example.org',
71  'HTTP_CONTENT_TYPE' => 'text/calendar',
72  ]);
73 
74  $body = [
75  'BEGIN:VCALENDAR',
76  'BEGIN:VTIMEZONE',
77  'END:VTIMEZONE',
78  'END:VCALENDAR',
79  ];
80 
81  $req->setBody(implode("\r\n", $body));
82 
83  $this->assertHTTPStatus(400, $req);
84 
85  }
$req
Definition: getUserInfo.php:20
static createFromServerArray(array $serverArray)
This static method will create a new Request object, based on a PHP $_SERVER array.
Definition: Sapi.php:107
+ Here is the call graph for this function:

◆ testPostPassThruNoOutBox()

Sabre\CalDAV\Schedule\OutboxPostTest::testPostPassThruNoOutBox ( )

Definition at line 37 of file OutboxPostTest.php.

References $req, and Sabre\HTTP\Sapi\createFromServerArray().

37  {
38 
40  'REQUEST_METHOD' => 'POST',
41  'REQUEST_URI' => '/calendars',
42  'HTTP_CONTENT_TYPE' => 'text/calendar',
43  ]);
44 
45  $this->assertHTTPStatus(501, $req);
46 
47  }
$req
Definition: getUserInfo.php:20
static createFromServerArray(array $serverArray)
This static method will create a new Request object, based on a PHP $_SERVER array.
Definition: Sapi.php:107
+ Here is the call graph for this function:

◆ testPostPassThruNotFound()

Sabre\CalDAV\Schedule\OutboxPostTest::testPostPassThruNotFound ( )

Definition at line 14 of file OutboxPostTest.php.

References $req, and Sabre\HTTP\Sapi\createFromServerArray().

14  {
15 
17  'REQUEST_METHOD' => 'POST',
18  'REQUEST_URI' => '/notfound',
19  'HTTP_CONTENT_TYPE' => 'text/calendar',
20  ]);
21 
22  $this->assertHTTPStatus(501, $req);
23 
24  }
$req
Definition: getUserInfo.php:20
static createFromServerArray(array $serverArray)
This static method will create a new Request object, based on a PHP $_SERVER array.
Definition: Sapi.php:107
+ Here is the call graph for this function:

◆ testPostPassThruNotTextCalendar()

Sabre\CalDAV\Schedule\OutboxPostTest::testPostPassThruNotTextCalendar ( )

Definition at line 26 of file OutboxPostTest.php.

References $req, and Sabre\HTTP\Sapi\createFromServerArray().

26  {
27 
29  'REQUEST_METHOD' => 'POST',
30  'REQUEST_URI' => '/calendars/user1/outbox',
31  ]);
32 
33  $this->assertHTTPStatus(501, $req);
34 
35  }
$req
Definition: getUserInfo.php:20
static createFromServerArray(array $serverArray)
This static method will create a new Request object, based on a PHP $_SERVER array.
Definition: Sapi.php:107
+ Here is the call graph for this function:

◆ testUnsupportedMethod()

Sabre\CalDAV\Schedule\OutboxPostTest::testUnsupportedMethod ( )

Definition at line 110 of file OutboxPostTest.php.

References $req, and Sabre\HTTP\Sapi\createFromServerArray().

110  {
111 
113  'REQUEST_METHOD' => 'POST',
114  'REQUEST_URI' => '/calendars/user1/outbox',
115  'HTTP_ORIGINATOR' => 'mailto:user1.sabredav@sabredav.org',
116  'HTTP_RECIPIENT' => 'mailto:user2@example.org',
117  'HTTP_CONTENT_TYPE' => 'text/calendar',
118  ]);
119 
120  $body = [
121  'BEGIN:VCALENDAR',
122  'METHOD:PUBLISH',
123  'BEGIN:VEVENT',
124  'END:VEVENT',
125  'END:VCALENDAR',
126  ];
127 
128  $req->setBody(implode("\r\n", $body));
129 
130  $this->assertHTTPStatus(501, $req);
131 
132  }
$req
Definition: getUserInfo.php:20
static createFromServerArray(array $serverArray)
This static method will create a new Request object, based on a PHP $_SERVER array.
Definition: Sapi.php:107
+ Here is the call graph for this function:

Field Documentation

◆ $autoLogin

Sabre\CalDAV\Schedule\OutboxPostTest::$autoLogin = 'user1'
protected

Definition at line 11 of file OutboxPostTest.php.

◆ $setupACL

Sabre\CalDAV\Schedule\OutboxPostTest::$setupACL = true
protected

Definition at line 10 of file OutboxPostTest.php.

◆ $setupCalDAV

Sabre\CalDAV\Schedule\OutboxPostTest::$setupCalDAV = true
protected

Definition at line 9 of file OutboxPostTest.php.

◆ $setupCalDAVScheduling

Sabre\CalDAV\Schedule\OutboxPostTest::$setupCalDAVScheduling = true
protected

Definition at line 12 of file OutboxPostTest.php.


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