ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
BasicCallBackTest.php
Go to the documentation of this file.
1
<?
php
2
3
namespace
Sabre\DAV\Auth\Backend
;
4
5
use
Sabre\HTTP\Response
;
6
use
Sabre\HTTP\Sapi
;
7
8
class
BasicCallBackTest
extends
\PHPUnit_Framework_TestCase
{
9
10
function
testCallBack
() {
11
12
$args = [];
13
$callBack =
function
(
$user
,
$pass
) use (&$args) {
14
15
$args = [
$user
,
$pass
];
16
return
true
;
17
18
};
19
20
$backend =
new
BasicCallBack
($callBack);
21
22
$request
=
Sapi::createFromServerArray
([
23
'HTTP_AUTHORIZATION'
=>
'Basic '
. base64_encode(
'foo:bar'
),
24
]);
25
$response
=
new
Response
();
26
27
$this->assertEquals(
28
[
true
,
'principals/foo'
],
29
$backend->check(
$request
,
$response
)
30
);
31
32
$this->assertEquals([
'foo'
,
'bar'
], $args);
33
34
}
35
36
}
Sabre\DAV\Auth\Backend\BasicCallBackTest
Definition:
BasicCallBackTest.php:8
$request
foreach($paths as $path) $request
Definition:
asyncclient.php:32
$pass
$pass
Definition:
UtfNormalGenerate.php:136
Sabre\DAV\Auth\Backend\BasicCallBack
Extremely simply HTTP Basic auth backend.
Definition:
BasicCallBack.php:17
PHPUnit_Framework_TestCase
Sabre\DAV\Auth\Backend
Definition:
AbstractBasic.php:3
Response
Sabre\HTTP\Response
This class represents a single HTTP response.
Definition:
Response.php:12
$user
$user
Definition:
migrateto20.php:57
php
Sabre\HTTP\Sapi\createFromServerArray
static createFromServerArray(array $serverArray)
This static method will create a new Request object, based on a PHP $_SERVER array.
Definition:
Sapi.php:107
Sapi
$response
$response
Definition:
proxy_ylocal.php:39
Sabre\DAV\Auth\Backend\BasicCallBackTest\testCallBack
testCallBack()
Definition:
BasicCallBackTest.php:10
libs
composer
vendor
sabre
dav
tests
Sabre
DAV
Auth
Backend
BasicCallBackTest.php
Generated on Thu Jan 30 2025 19:01:29 for ILIAS by
1.8.13 (using
Doxyfile
)