Definition at line 5 of file TestUtil.php.
◆ clearTempDir()
static Sabre\TestUtil::clearTempDir |
( |
| ) |
|
|
static |
This function deletes all the contents of the temporary directory.
- Returns
- void
Definition at line 12 of file TestUtil.php.
12 {
13
15
16 }
static deleteTree($path, $deleteRoot=true)
Referenced by Sabre\DAV\Locks\Backend\FileTest\getBackend(), Sabre\DAV\Browser\GuessContentTypeTest\setUp(), Sabre\DAV\Issue33Test\setUp(), Sabre\DAV\ObjectTreeTest\setup(), Sabre\DAV\Browser\GuessContentTypeTest\tearDown(), Sabre\DAV\FSExt\FileTest\tearDown(), Sabre\DAV\Locks\Backend\FileTest\tearDown(), Sabre\DAV\Locks\MSWordTest\tearDown(), Sabre\DAV\Locks\Plugin2Test\tearDown(), Sabre\DAV\ObjectTreeTest\teardown(), Sabre\DAV\PartialUpdate\SpecificationTest\tearDown(), Sabre\DAVACL\FS\CollectionTest\tearDown(), and Sabre\DAVACL\FS\HomeCollectionTest\tearDown().
◆ deleteTree()
static Sabre\TestUtil::deleteTree |
( |
|
$path, |
|
|
|
$deleteRoot = true |
|
) |
| |
|
staticprivate |
Definition at line 19 of file TestUtil.php.
19 {
20
21 foreach (scandir(
$path) as $node) {
22
23 if ($node == '.' || $node == '..') continue;
24 $myPath =
$path .
'/' . $node;
25 if (is_file($myPath)) {
26 unlink($myPath);
27 } else {
29 }
30
31 }
32 if ($deleteRoot) {
34 }
35
36 }
References $path.
◆ getMySQLDB()
static Sabre\TestUtil::getMySQLDB |
( |
| ) |
|
|
static |
Definition at line 38 of file TestUtil.php.
38 {
39
40 try {
41 $pdo = new \PDO(SABRE_MYSQLDSN, SABRE_MYSQLUSER, SABRE_MYSQLPASS);
42 $pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
44 } catch (\PDOException $e) {
45 return null;
46 }
47
48 }
References $pdo.
◆ getPgSqlDB()
static Sabre\TestUtil::getPgSqlDB |
( |
| ) |
|
|
static |
Definition at line 58 of file TestUtil.php.
58 {
59
60
61 $pdo = new \PDO(SABRE_PGSQLDSN);
62 $pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
64
65
66
67
68 }
References $pdo.
◆ getSQLiteDB()
static Sabre\TestUtil::getSQLiteDB |
( |
| ) |
|
|
static |
Definition at line 50 of file TestUtil.php.
50 {
51
52 $pdo = new \PDO(
'sqlite:' . SABRE_TEMPDIR .
'/pdobackend');
53 $pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
55
56 }
References $pdo.
The documentation for this class was generated from the following file: