mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-23 10:47:00 +00:00
Initial Release of the calendar plugin
This commit is contained in:
parent
45cc9885fc
commit
7115197a33
561 changed files with 189494 additions and 0 deletions
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
|
||||
require_once 'Sabre/TestUtil.php';
|
||||
|
||||
class Sabre_DAVACL_PrincipalBackend_PDOMySQLTest extends Sabre_DAVACL_PrincipalBackend_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 principals");
|
||||
$pdo->query("
|
||||
create table principals (
|
||||
id integer unsigned not null primary key auto_increment,
|
||||
uri varchar(50),
|
||||
email varchar(80),
|
||||
displayname VARCHAR(80),
|
||||
vcardurl VARCHAR(80),
|
||||
unique(uri)
|
||||
);");
|
||||
|
||||
$pdo->query("INSERT INTO principals (uri,email,displayname) VALUES ('principals/user','user@example.org','User')");
|
||||
$pdo->query("INSERT INTO principals (uri,email,displayname) VALUES ('principals/group','group@example.org','Group')");
|
||||
$pdo->query("DROP TABLE IF EXISTS groupmembers");
|
||||
$pdo->query("CREATE TABLE groupmembers (
|
||||
id INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||
principal_id INTEGER UNSIGNED NOT NULL,
|
||||
member_id INTEGER UNSIGNED NOT NULL,
|
||||
UNIQUE(principal_id, member_id)
|
||||
);");
|
||||
|
||||
$pdo->query("INSERT INTO groupmembers (principal_id,member_id) VALUES (2,1)");
|
||||
|
||||
return $pdo;
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue