1<?php 2 3namespace Sabre\DAV\PropertyStorage\Backend; 4 5class PDOMySqlTest extends AbstractPDOTest { 6 7 function getPDO() { 8 9 $pdo = \Sabre\TestUtil::getMySQLDB(); 10 if (!$pdo) $this->markTestSkipped('MySQL is not enabled'); 11 12 $setupSql = file_get_contents(__DIR__ . '/../../../../../examples/sql/mysql.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} 31 32