Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F1842510
PDOSqliteTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Size
953 B
Subscribers
None
PDOSqliteTest.php
View Options
<?php
namespace
Sabre\CalDAV\Backend
;
use
Sabre\CalDAV
;
require_once
'Sabre/CalDAV/Backend/AbstractPDOTest.php'
;
class
PDOSQLiteTest
extends
AbstractPDOTest
{
function
setup
()
{
if
(!
SABRE_HASSQLITE
)
$this
->
markTestSkipped
(
'SQLite driver is not available'
);
if
(
file_exists
(
SABRE_TEMPDIR
.
'/testdb.sqlite'
))
unlink
(
SABRE_TEMPDIR
.
'/testdb.sqlite'
);
$pdo
=
new
\PDO
(
'sqlite:'
.
SABRE_TEMPDIR
.
'/testdb.sqlite'
);
$pdo
->
setAttribute
(
\PDO
::
ATTR_ERRMODE
,
\PDO
::
ERRMODE_EXCEPTION
);
// Yup this is definitely not 'fool proof', but good enough for now.
$queries
=
explode
(
';'
,
file_get_contents
(
__DIR__
.
'/../../../../examples/sql/sqlite.calendars.sql'
));
foreach
(
$queries
as
$query
)
{
$pdo
->
exec
(
$query
);
}
$this
->
pdo
=
$pdo
;
}
function
teardown
()
{
$this
->
pdo
=
null
;
unlink
(
SABRE_TEMPDIR
.
'/testdb.sqlite'
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Wed, Jan 8, 7:02 AM (2 d, 13 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
914155
Default Alt Text
PDOSqliteTest.php (953 B)
Attached To
rDAVCAL DokuWiki DAVCal PlugIn
Event Timeline
Log In to Comment