Definition at line 8 of file PluginTest.php.
◆ testAuthenticate()
Sabre\DAV\Auth\PluginTest::testAuthenticate |
( |
| ) |
|
testInit
Definition at line 24 of file PluginTest.php.
26 $fakeServer =
new DAV\Server(
new DAV\SimpleCollection(
'bla'));
27 $plugin =
new Plugin(
new Backend\Mock());
28 $fakeServer->addPlugin($plugin);
30 $fakeServer->emit(
'beforeMethod', [
new HTTP\Request(),
new HTTP\Response()])
◆ testAuthenticateFail()
Sabre\DAV\Auth\PluginTest::testAuthenticateFail |
( |
| ) |
|
testInit Sabre
Definition at line 39 of file PluginTest.php.
41 $fakeServer =
new DAV\Server(
new DAV\SimpleCollection(
'bla'));
42 $backend =
new Backend\Mock();
43 $backend->fail =
true;
45 $plugin =
new Plugin($backend);
46 $fakeServer->addPlugin($plugin);
47 $fakeServer->emit(
'beforeMethod', [
new HTTP\Request(),
new HTTP\Response()]);
◆ testAuthenticateFailDontAutoRequire()
Sabre\DAV\Auth\PluginTest::testAuthenticateFailDontAutoRequire |
( |
| ) |
|
testAuthenticateFail
Definition at line 54 of file PluginTest.php.
56 $fakeServer =
new DAV\Server(
new DAV\SimpleCollection(
'bla'));
57 $backend =
new Backend\Mock();
58 $backend->fail =
true;
60 $plugin =
new Plugin($backend);
61 $plugin->autoRequireLogin =
false;
62 $fakeServer->addPlugin($plugin);
64 $fakeServer->emit(
'beforeMethod', [
new HTTP\Request(),
new HTTP\Response()])
66 $this->assertEquals(1, count($plugin->getLoginFailedReasons()));
◆ testGetCurrentPrincipal()
Sabre\DAV\Auth\PluginTest::testGetCurrentPrincipal |
( |
| ) |
|
testAuthenticate
Definition at line 123 of file PluginTest.php.
125 $fakeServer =
new DAV\Server(
new DAV\SimpleCollection(
'bla'));
126 $plugin =
new Plugin(
new Backend\Mock());
127 $fakeServer->addPlugin($plugin);
128 $fakeServer->emit(
'beforeMethod', [
new HTTP\Request(),
new HTTP\Response()]);
129 $this->assertEquals(
'principals/admin', $plugin->getCurrentPrincipal());
◆ testInit()
Sabre\DAV\Auth\PluginTest::testInit |
( |
| ) |
|
Definition at line 10 of file PluginTest.php.
12 $fakeServer =
new DAV\Server(
new DAV\SimpleCollection(
'bla'));
13 $plugin =
new Plugin(
new Backend\Mock());
14 $this->assertTrue($plugin instanceof Plugin);
15 $fakeServer->addPlugin($plugin);
16 $this->assertEquals($plugin, $fakeServer->getPlugin(
'auth'));
17 $this->assertInternalType(
'array', $plugin->getPluginInfo());
◆ testInvalidCheckResponse()
Sabre\DAV\Auth\PluginTest::testInvalidCheckResponse |
( |
| ) |
|
testInit Sabre
Definition at line 108 of file PluginTest.php.
110 $fakeServer =
new DAV\Server(
new DAV\SimpleCollection(
'bla'));
111 $backend =
new Backend\Mock();
112 $backend->invalidCheckResponse =
true;
114 $plugin =
new Plugin($backend);
115 $fakeServer->addPlugin($plugin);
116 $fakeServer->emit(
'beforeMethod', [
new HTTP\Request(),
new HTTP\Response()]);
◆ testMultipleBackend()
Sabre\DAV\Auth\PluginTest::testMultipleBackend |
( |
| ) |
|
testAuthenticate
Definition at line 73 of file PluginTest.php.
75 $fakeServer =
new DAV\Server(
new DAV\SimpleCollection(
'bla'));
76 $backend1 =
new Backend\Mock();
77 $backend2 =
new Backend\Mock();
78 $backend2->fail =
true;
80 $plugin =
new Plugin();
81 $plugin->addBackend($backend1);
82 $plugin->addBackend($backend2);
84 $fakeServer->addPlugin($plugin);
85 $fakeServer->emit(
'beforeMethod', [
new HTTP\Request(),
new HTTP\Response()]);
87 $this->assertEquals(
'principals/admin', $plugin->getCurrentPrincipal());
◆ testNoAuthBackend()
Sabre\DAV\Auth\PluginTest::testNoAuthBackend |
( |
| ) |
|
testInit Sabre
Definition at line 95 of file PluginTest.php.
97 $fakeServer =
new DAV\Server(
new DAV\SimpleCollection(
'bla'));
99 $plugin =
new Plugin();
100 $fakeServer->addPlugin($plugin);
101 $fakeServer->emit(
'beforeMethod', [
new HTTP\Request(),
new HTTP\Response()]);
The documentation for this class was generated from the following file: