Documentation

HttpPutTest extends DAVServerTest
in package

Tests related to the PUT request.

Tags
copyright

Copyright (C) fruux GmbH (https://fruux.com/)

author

Evert Pot (http://evertpot.com/)

license

http://sabre.io/license/ Modified BSD License

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
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
Sets up the DAV tree.
testFinderPutFail()  : mixed
Same as the last one, but in this case we're mimicing a failed request.
testFinderPutSuccess()  : mixed
Finder may sometimes make a request, which gets its content-body stripped. We can't always prevent this from happening, but in some cases we can detected this and return an error instead.
testPut()  : mixed
A successful PUT of a new file.
testPutContentRange()  : mixed
PUT with Content-Range should be rejected.
testPutExisting()  : mixed
A successful PUT on an existing file.
testPutExistingIfMatchCorrect()  : mixed
PUT on existing file with If-Match: with a correct etag.
testPutExistingIfMatchStar()  : mixed
PUT on existing file with If-Match: *.
testPutExistingIfNoneMatchStar()  : mixed
PUT on existing file with If-None-Match: * should fail.
testPutIfMatchStar()  : mixed
PUT on non-existing file with If-Match: * should fail.
testPutIfNoneMatchStar()  : mixed
PUT on non-existing file with If-None-Match: * should work.
testPutIntercept()  : mixed
Plugins can intercept PUT. We need to make sure that works.
testPutNoParent()  : mixed
PUT thats created in a non-collection should be rejected.

Properties

$autoLogin

If this string is set, we will automatically log in the user with this name.

protected mixed $autoLogin = null

$caldavCalendarObjects

protected mixed $caldavCalendarObjects = []

$caldavCalendars

An array with calendars. Every calendar should have - principaluri - uri.

protected mixed $caldavCalendars = []

$carddavAddressBooks

protected mixed $carddavAddressBooks = []

$propertyStorageBackend

protected mixed $propertyStorageBackend

$propertyStoragePlugin

protected mixed $propertyStoragePlugin

$setupCalDAVICSExport

protected mixed $setupCalDAVICSExport = false

$setupCalDAVScheduling

protected mixed $setupCalDAVScheduling = false

$setupCalDAVSharing

protected mixed $setupCalDAVSharing = false

$setupCalDAVSubscriptions

protected mixed $setupCalDAVSubscriptions = false

$setupPropertyStorage

protected mixed $setupPropertyStorage = false

Methods

assertHttpStatus()

public assertHttpStatus(mixed $expectedStatus, Request $req) : mixed
Parameters
$expectedStatus : mixed
$req : Request
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

setUpBackends()

public setUpBackends() : mixed
Return values
mixed

setUpTree()

Sets up the DAV tree.

public setUpTree() : mixed
Return values
mixed

testFinderPutFail()

Same as the last one, but in this case we're mimicing a failed request.

public testFinderPutFail() : mixed
Tags
depends

testFinderPutSuccess

Return values
mixed

testFinderPutSuccess()

Finder may sometimes make a request, which gets its content-body stripped. We can't always prevent this from happening, but in some cases we can detected this and return an error instead.

public testFinderPutSuccess() : mixed
Tags
depends

testPut

Return values
mixed

testPut()

A successful PUT of a new file.

public testPut() : mixed
Return values
mixed

testPutContentRange()

PUT with Content-Range should be rejected.

public testPutContentRange() : mixed
Tags
depends

testPut

Return values
mixed

testPutExisting()

A successful PUT on an existing file.

public testPutExisting() : mixed
Tags
depends

testPut

Return values
mixed

testPutExistingIfMatchCorrect()

PUT on existing file with If-Match: with a correct etag.

public testPutExistingIfMatchCorrect() : mixed
Tags
depends

testPutExisting

Return values
mixed

testPutExistingIfMatchStar()

PUT on existing file with If-Match: *.

public testPutExistingIfMatchStar() : mixed
Tags
depends

testPutExisting

Return values
mixed

testPutExistingIfNoneMatchStar()

PUT on existing file with If-None-Match: * should fail.

public testPutExistingIfNoneMatchStar() : mixed
Tags
depends

testPut

Return values
mixed

testPutIfMatchStar()

PUT on non-existing file with If-Match: * should fail.

public testPutIfMatchStar() : mixed
Tags
depends

testPut

Return values
mixed

testPutIfNoneMatchStar()

PUT on non-existing file with If-None-Match: * should work.

public testPutIfNoneMatchStar() : mixed
Tags
depends

testPut

Return values
mixed

testPutIntercept()

Plugins can intercept PUT. We need to make sure that works.

public testPutIntercept() : mixed
Tags
depends

testPut

Return values
mixed

testPutNoParent()

PUT thats created in a non-collection should be rejected.

public testPutNoParent() : mixed
Tags
depends

testPut

Return values
mixed

Search results