1<?php
2
3namespace Sabre\DAV\Auth\Backend;
4
5require_once 'Sabre/TestUtil.php';
6
7class PDOMySQLTest extends AbstractPDOTest {
8
9    function getPDO() {
10
11        if (!SABRE_HASMYSQL) $this->markTestSkipped('MySQL driver is not available, or not properly configured');
12        $pdo = \Sabre\TestUtil::getMySQLDB();
13        if (!$pdo) $this->markTestSkipped('Could not connect to MySQL database');
14        $pdo->query("DROP TABLE IF EXISTS users");
15        $pdo->query("
16create table users (
17	id integer unsigned not null primary key auto_increment,
18	username varchar(50),
19	digesta1 varchar(32),
20    email varchar(80),
21    displayname varchar(80),
22	unique(username)
23);");
24
25        $pdo->query("INSERT INTO users (username,digesta1,email,displayname) VALUES ('user','hash','user@example.org','User')");
26
27        return $pdo;
28
29    }
30
31}
32