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.
Referenced by Sabre\DAV\Locks\Backend\FileTest\getBackend(), Sabre\DAV\Browser\GuessContentTypeTest\setUp(), Sabre\DAV\ObjectTreeTest\setup(), Sabre\DAV\Issue33Test\setUp(), Sabre\DAV\Locks\MSWordTest\tearDown(), Sabre\DAVACL\FS\CollectionTest\tearDown(), Sabre\DAV\FSExt\FileTest\tearDown(), Sabre\DAV\Locks\Plugin2Test\tearDown(), Sabre\DAV\Locks\Backend\FileTest\tearDown(), Sabre\DAV\Browser\GuessContentTypeTest\tearDown(), Sabre\DAV\ObjectTreeTest\teardown(), Sabre\DAVACL\FS\HomeCollectionTest\tearDown(), and Sabre\DAV\PartialUpdate\SpecificationTest\tearDown().
14 self::deleteTree(SABRE_TEMPDIR,
false);
◆ deleteTree()
static Sabre\TestUtil::deleteTree |
( |
|
$path, |
|
|
|
$deleteRoot = true |
|
) |
| |
|
staticprivate |
Definition at line 19 of file TestUtil.php.
References $path.
21 foreach (scandir(
$path) as $node) {
23 if ($node ==
'.' || $node ==
'..')
continue;
24 $myPath =
$path .
'/' . $node;
25 if (is_file($myPath)) {
28 self::deleteTree($myPath);
◆ getMySQLDB()
static Sabre\TestUtil::getMySQLDB |
( |
| ) |
|
|
static |
Definition at line 38 of file TestUtil.php.
References $pdo.
41 $pdo = new \PDO(SABRE_MYSQLDSN, SABRE_MYSQLUSER, SABRE_MYSQLPASS);
42 $pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
◆ getPgSqlDB()
static Sabre\TestUtil::getPgSqlDB |
( |
| ) |
|
|
static |
Definition at line 58 of file TestUtil.php.
References $pdo.
61 $pdo = new \PDO(SABRE_PGSQLDSN);
62 $pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
◆ getSQLiteDB()
static Sabre\TestUtil::getSQLiteDB |
( |
| ) |
|
|
static |
Definition at line 50 of file TestUtil.php.
References $pdo.
52 $pdo = new \PDO(
'sqlite:' . SABRE_TEMPDIR .
'/pdobackend');
53 $pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
The documentation for this class was generated from the following file: