ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
AbstractPDOTest.php
Go to the documentation of this file.
1
<?
php
2
3
namespace
Sabre\DAV\Auth\Backend
;
4
5
abstract
class
AbstractPDOTest
extends
\PHPUnit_Framework_TestCase
{
6
7
use \Sabre\DAV\DbTestHelperTrait
;
8
9
function
setUp
() {
10
11
$this->
dropTables
(
'users'
);
12
$this->
createSchema
(
'users'
);
13
14
$this->
getPDO
()->query(
15
"INSERT INTO users (username,digesta1) VALUES ('user','hash')"
16
17
);
18
19
}
20
21
function
testConstruct
() {
22
23
$pdo
= $this->
getPDO
();
24
$backend =
new
PDO
(
$pdo
);
25
$this->assertTrue($backend instanceof
PDO
);
26
27
}
28
32
function
testUserInfo
() {
33
34
$pdo
= $this->
getPDO
();
35
$backend =
new
PDO
(
$pdo
);
36
37
$this->assertNull($backend->getDigestHash(
'realm'
,
'blabla'
));
38
39
$expected =
'hash'
;
40
41
$this->assertEquals($expected, $backend->getDigestHash(
'realm'
,
'user'
));
42
43
}
44
45
}
Sabre\DAV\Auth\Backend\AbstractPDOTest\setUp
setUp()
Definition:
AbstractPDOTest.php:9
Sabre\DAV\getPDO
getPDO()
Alias for getDb.
Definition:
DbTestHelperTrait.php:82
Sabre\DAV\Auth\Backend\AbstractPDOTest\testConstruct
testConstruct()
Definition:
AbstractPDOTest.php:21
PHPUnit_Framework_TestCase
Sabre\DAV\dropTables
dropTables($tableNames)
Drops tables, if they exist.
Definition:
DbTestHelperTrait.php:120
Sabre\DAV\Auth\Backend
Definition:
AbstractBasic.php:3
Sabre\DAV\createSchema
createSchema($schemaName)
Uses .sql files from the examples directory to initialize the database.
Definition:
DbTestHelperTrait.php:94
PDO
Sabre\DAV\Auth\Backend\AbstractPDOTest\testUserInfo
testUserInfo()
testConstruct
Definition:
AbstractPDOTest.php:32
Sabre\DAV\DbTestHelperTrait
trait DbTestHelperTrait
Definition:
DbTestHelperTrait.php:14
$pdo
$pdo
Definition:
migrateto20.php:62
Sabre\DAV\Auth\Backend\AbstractPDOTest
Definition:
AbstractPDOTest.php:5
php
libs
composer
vendor
sabre
dav
tests
Sabre
DAV
Auth
Backend
AbstractPDOTest.php
Generated on Thu Jan 16 2025 19:01:51 for ILIAS by
1.8.13 (using
Doxyfile
)