ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
FileTest.php
Go to the documentation of this file.
1
<?
php
2
3
namespace
Sabre\DAV\Auth\Backend
;
4
5
class
FileTest
extends
\PHPUnit_Framework_TestCase
{
6
7
function
tearDown
() {
8
9
if
(file_exists(SABRE_TEMPDIR .
'/filebackend'
)) unlink(SABRE_TEMPDIR .
'/filebackend'
);
10
11
}
12
13
function
testConstruct
() {
14
15
$file =
new
File
();
16
$this->assertTrue($file instanceof
File
);
17
18
}
19
23
function
testLoadFileBroken
() {
24
25
file_put_contents(SABRE_TEMPDIR .
'/backend'
,
'user:realm:hash'
);
26
$file =
new
File
(SABRE_TEMPDIR .
'/backend'
);
27
28
}
29
30
function
testLoadFile
() {
31
32
file_put_contents(SABRE_TEMPDIR .
'/backend'
,
'user:realm:'
. md5(
'user:realm:password'
));
33
$file =
new
File
();
34
$file->loadFile(SABRE_TEMPDIR .
'/backend'
);
35
36
$this->assertFalse($file->getDigestHash(
'realm'
,
'blabla'
));
37
$this->assertEquals(md5(
'user:realm:password'
), $file->getDigestHash(
'realm'
,
'user'
));
38
39
}
40
41
}
File
Sabre\DAV\Auth\Backend\FileTest\testConstruct
testConstruct()
Definition:
FileTest.php:13
Sabre\DAV\Auth\Backend\FileTest\testLoadFileBroken
testLoadFileBroken()
Sabre
Definition:
FileTest.php:23
PHPUnit_Framework_TestCase
Sabre\DAV\Auth\Backend
Definition:
AbstractBasic.php:3
Sabre\DAV\Auth\Backend\FileTest\testLoadFile
testLoadFile()
Definition:
FileTest.php:30
Sabre\DAV\Auth\Backend\FileTest
Definition:
FileTest.php:5
Sabre\DAV\Auth\Backend\FileTest\tearDown
tearDown()
Definition:
FileTest.php:7
php
libs
composer
vendor
sabre
dav
tests
Sabre
DAV
Auth
Backend
FileTest.php
Generated on Thu Jan 30 2025 19:01:29 for ILIAS by
1.8.13 (using
Doxyfile
)