Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F1820533
PDOTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Size
837 B
Subscribers
None
PDOTest.php
View Options
<?php
namespace
Sabre\DAV\Locks\Backend
;
require_once
'Sabre/TestUtil.php'
;
require_once
'Sabre/DAV/Locks/Backend/AbstractTest.php'
;
class
PDOTest
extends
AbstractTest
{
function
getBackend
()
{
if
(!
SABRE_HASSQLITE
)
$this
->
markTestSkipped
(
'SQLite driver is not available'
);
\Sabre\TestUtil
::
clearTempDir
();
mkdir
(
SABRE_TEMPDIR
.
'/pdolocks'
);
$pdo
=
new
\PDO
(
'sqlite:'
.
SABRE_TEMPDIR
.
'/pdolocks/db.sqlite'
);
$pdo
->
setAttribute
(
\PDO
::
ATTR_ERRMODE
,
\PDO
::
ERRMODE_EXCEPTION
);
$pdo
->
query
(
'CREATE TABLE locks ( id integer primary key asc, owner text, timeout text, created integer, token text, scope integer, depth integer, uri text)'
);
$backend
=
new
PDO
(
$pdo
);
return
$backend
;
}
function
tearDown
()
{
\Sabre\TestUtil
::
clearTempDir
();
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Dec 22, 5:01 AM (4 d, 14 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
914211
Default Alt Text
PDOTest.php (837 B)
Attached To
rDAVCAL DokuWiki DAVCal PlugIn
Event Timeline
Log In to Comment