1<?php 2 3namespace Sabre\DAV\PropertyStorage\Backend; 4 5class PDOSqliteTest extends AbstractPDOTest { 6 7 function getPDO() { 8 9 $pdo = \Sabre\TestUtil::getSqliteDB(); 10 if (!$pdo) $this->markTestSkipped('Sqlite is not enabled'); 11 12 $setupSql = file_get_contents(__DIR__ . '/../../../../../examples/sql/sqlite.propertystorage.sql'); 13 // Sloppy multi-query, but it works 14 $setupSql = explode(';', $setupSql); 15 16 $pdo->exec('DROP TABLE IF EXISTS propertystorage'); 17 18 foreach($setupSql as $sql) { 19 20 if (!trim($sql)) continue; 21 $pdo->exec($sql); 22 23 } 24 $pdo->exec('INSERT INTO propertystorage (path, name, value) VALUES ("dir", "{DAV:}displayname", "Directory")'); 25 26 return $pdo; 27 28 } 29 30 function tearDown() { 31 32 \Sabre\TestUtil::clearTempDir(); 33 34 } 35 36} 37 38