Definition at line 7 of file AllowAccessTest.php.
◆ setUp()
Sabre\DAVACL\AllowAccessTest::setUp |
( |
| ) |
|
Definition at line 14 of file AllowAccessTest.php.
14 {
15
17 new DAV\Mock\Collection('testdir', [
18 'file1.txt' => 'contents',
19 ]),
20 ];
21
22 $this->server =
new DAV\Server(
$nodes);
23 $this->server->addPlugin(
24 new DAV\Auth\Plugin(
25 new DAV\Auth\Backend\Mock()
26 )
27 );
28
29 $this->server->getPlugin('auth')->beforeMethod(
30 new \
Sabre\HTTP\Request(),
31 new \
Sabre\HTTP\Response()
32 );
35
36 }
References $aclPlugin, and $nodes.
◆ testBeforeBind()
Sabre\DAVACL\AllowAccessTest::testBeforeBind |
( |
| ) |
|
Definition at line 119 of file AllowAccessTest.php.
119 {
120
121 $this->assertTrue($this->server->emit('beforeBind', ['testdir/file']));
122
123 }
◆ testBeforeUnbind()
Sabre\DAVACL\AllowAccessTest::testBeforeUnbind |
( |
| ) |
|
Definition at line 126 of file AllowAccessTest.php.
126 {
127
128 $this->assertTrue($this->server->emit('beforeUnbind', ['testdir']));
129
130 }
◆ testCOPY()
Sabre\DAVACL\AllowAccessTest::testCOPY |
( |
| ) |
|
Definition at line 92 of file AllowAccessTest.php.
92 {
93
94 $this->server->httpRequest->setMethod('COPY');
95 $this->server->httpRequest->setUrl('/testdir');
96
97 $this->assertTrue($this->server->emit('beforeMethod', [$this->server->httpRequest, $this->server->httpResponse]));
98
99 }
◆ testGet()
Sabre\DAVACL\AllowAccessTest::testGet |
( |
| ) |
|
Definition at line 38 of file AllowAccessTest.php.
38 {
39
40 $this->server->httpRequest->setMethod('GET');
41 $this->server->httpRequest->setUrl('/testdir');
42
43 $this->assertTrue($this->server->emit('beforeMethod', [$this->server->httpRequest, $this->server->httpResponse]));
44
45 }
◆ testGetDoesntExist()
Sabre\DAVACL\AllowAccessTest::testGetDoesntExist |
( |
| ) |
|
Definition at line 47 of file AllowAccessTest.php.
47 {
48
49 $this->server->httpRequest->setMethod('GET');
50 $this->server->httpRequest->setUrl('/foo');
51
52 $this->assertTrue($this->server->emit('beforeMethod', [$this->server->httpRequest, $this->server->httpResponse]));
53
54 }
◆ testHEAD()
Sabre\DAVACL\AllowAccessTest::testHEAD |
( |
| ) |
|
Definition at line 56 of file AllowAccessTest.php.
56 {
57
58 $this->server->httpRequest->setMethod('HEAD');
59 $this->server->httpRequest->setUrl('/testdir');
60
61 $this->assertTrue($this->server->emit('beforeMethod', [$this->server->httpRequest, $this->server->httpResponse]));
62
63 }
◆ testLOCK()
Sabre\DAVACL\AllowAccessTest::testLOCK |
( |
| ) |
|
Definition at line 110 of file AllowAccessTest.php.
110 {
111
112 $this->server->httpRequest->setMethod('LOCK');
113 $this->server->httpRequest->setUrl('/testdir');
114
115 $this->assertTrue($this->server->emit('beforeMethod', [$this->server->httpRequest, $this->server->httpResponse]));
116
117 }
◆ testMOVE()
Sabre\DAVACL\AllowAccessTest::testMOVE |
( |
| ) |
|
Definition at line 101 of file AllowAccessTest.php.
101 {
102
103 $this->server->httpRequest->setMethod('MOVE');
104 $this->server->httpRequest->setUrl('/testdir');
105
106 $this->assertTrue($this->server->emit('beforeMethod', [$this->server->httpRequest, $this->server->httpResponse]));
107
108 }
◆ testOPTIONS()
Sabre\DAVACL\AllowAccessTest::testOPTIONS |
( |
| ) |
|
Definition at line 65 of file AllowAccessTest.php.
65 {
66
67 $this->server->httpRequest->setMethod('OPTIONS');
68 $this->server->httpRequest->setUrl('/testdir');
69
70 $this->assertTrue($this->server->emit('beforeMethod', [$this->server->httpRequest, $this->server->httpResponse]));
71
72 }
◆ testPROPPATCH()
Sabre\DAVACL\AllowAccessTest::testPROPPATCH |
( |
| ) |
|
Definition at line 83 of file AllowAccessTest.php.
83 {
84
85 $this->server->httpRequest->setMethod('PROPPATCH');
86 $this->server->httpRequest->setUrl('/testdir');
87
88 $this->assertTrue($this->server->emit('beforeMethod', [$this->server->httpRequest, $this->server->httpResponse]));
89
90 }
◆ testPUT()
Sabre\DAVACL\AllowAccessTest::testPUT |
( |
| ) |
|
Definition at line 74 of file AllowAccessTest.php.
74 {
75
76 $this->server->httpRequest->setMethod('PUT');
77 $this->server->httpRequest->setUrl('/testdir/file1.txt');
78
79 $this->assertTrue($this->server->emit('beforeMethod', [$this->server->httpRequest, $this->server->httpResponse]));
80
81 }
◆ $server
Sabre\DAVACL\AllowAccessTest::$server |
|
protected |
The documentation for this class was generated from the following file: