18 'file1.txt' =>
'contents',
23 $this->server->addPlugin(
25 new DAV\Auth\Backend\Mock()
29 $this->server->getPlugin(
'auth')->beforeMethod(
40 $this->server->httpRequest->setMethod(
'GET');
41 $this->server->httpRequest->setUrl(
'/testdir');
43 $this->assertTrue($this->server->emit(
'beforeMethod', [$this->server->httpRequest, $this->server->httpResponse]));
49 $this->server->httpRequest->setMethod(
'GET');
50 $this->server->httpRequest->setUrl(
'/foo');
52 $this->assertTrue($this->server->emit(
'beforeMethod', [$this->server->httpRequest, $this->server->httpResponse]));
58 $this->server->httpRequest->setMethod(
'HEAD');
59 $this->server->httpRequest->setUrl(
'/testdir');
61 $this->assertTrue($this->server->emit(
'beforeMethod', [$this->server->httpRequest, $this->server->httpResponse]));
67 $this->server->httpRequest->setMethod(
'OPTIONS');
68 $this->server->httpRequest->setUrl(
'/testdir');
70 $this->assertTrue($this->server->emit(
'beforeMethod', [$this->server->httpRequest, $this->server->httpResponse]));
76 $this->server->httpRequest->setMethod(
'PUT');
77 $this->server->httpRequest->setUrl(
'/testdir/file1.txt');
79 $this->assertTrue($this->server->emit(
'beforeMethod', [$this->server->httpRequest, $this->server->httpResponse]));
85 $this->server->httpRequest->setMethod(
'PROPPATCH');
86 $this->server->httpRequest->setUrl(
'/testdir');
88 $this->assertTrue($this->server->emit(
'beforeMethod', [$this->server->httpRequest, $this->server->httpResponse]));
94 $this->server->httpRequest->setMethod(
'COPY');
95 $this->server->httpRequest->setUrl(
'/testdir');
97 $this->assertTrue($this->server->emit(
'beforeMethod', [$this->server->httpRequest, $this->server->httpResponse]));
103 $this->server->httpRequest->setMethod(
'MOVE');
104 $this->server->httpRequest->setUrl(
'/testdir');
106 $this->assertTrue($this->server->emit(
'beforeMethod', [$this->server->httpRequest, $this->server->httpResponse]));
112 $this->server->httpRequest->setMethod(
'LOCK');
113 $this->server->httpRequest->setUrl(
'/testdir');
115 $this->assertTrue($this->server->emit(
'beforeMethod', [$this->server->httpRequest, $this->server->httpResponse]));
121 $this->assertTrue($this->server->emit(
'beforeBind', [
'testdir/file']));
128 $this->assertTrue($this->server->emit(
'beforeUnbind', [
'testdir']));
The Request class represents a single HTTP request.
This class represents a single HTTP response.