Page MenuHomePhabricator

PDOSqliteTest.php
No OneTemporary

PDOSqliteTest.php

<?php
namespace Sabre\DAV\PropertyStorage\Backend;
class PDOSqliteTest extends AbstractPDOTest {
function getPDO() {
$pdo = \Sabre\TestUtil::getSqliteDB();
if (!$pdo) $this->markTestSkipped('Sqlite is not enabled');
$setupSql = file_get_contents(__DIR__ . '/../../../../../examples/sql/sqlite.propertystorage.sql');
// Sloppy multi-query, but it works
$setupSql = explode(';', $setupSql);
$pdo->exec('DROP TABLE IF EXISTS propertystorage');
foreach($setupSql as $sql) {
if (!trim($sql)) continue;
$pdo->exec($sql);
}
$pdo->exec('INSERT INTO propertystorage (path, name, value) VALUES ("dir", "{DAV:}displayname", "Directory")');
return $pdo;
}
function tearDown() {
\Sabre\TestUtil::clearTempDir();
}
}

File Metadata

Mime Type
text/x-php
Expires
Tue, Jan 7, 2:04 PM (3 d, 7 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
914644
Default Alt Text
PDOSqliteTest.php (847 B)

Event Timeline