mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-25 04:43:41 +00:00
29 lines
837 B
PHP
29 lines
837 B
PHP
<?php
|
|
|
|
require_once 'Sabre/TestUtil.php';
|
|
|
|
class Sabre_DAV_Auth_Backend_PDOMySQLTest extends Sabre_DAV_Auth_Backend_AbstractPDOTest {
|
|
|
|
function getPDO() {
|
|
|
|
if (!SABRE_HASMYSQL) $this->markTestSkipped('MySQL driver is not available, or not properly configured');
|
|
$pdo = Sabre_TestUtil::getMySQLDB();
|
|
if (!$pdo) $this->markTestSkipped('Could not connect to MySQL database');
|
|
$pdo->query("DROP TABLE IF EXISTS users");
|
|
$pdo->query("
|
|
create table users (
|
|
id integer unsigned not null primary key auto_increment,
|
|
username varchar(50),
|
|
digesta1 varchar(32),
|
|
email varchar(80),
|
|
displayname varchar(80),
|
|
unique(username)
|
|
);");
|
|
|
|
$pdo->query("INSERT INTO users (username,digesta1,email,displayname) VALUES ('user','hash','user@example.org','User')");
|
|
|
|
return $pdo;
|
|
|
|
}
|
|
|
|
}
|