1<?php
2require_once DOKU_INC.'lib/plugins/strata/helper/triples.php';
3
4/**
5 * Base test class for Strata plugin.
6 */
7class Strata_UnitTestCase extends DokuWikiTest {
8
9	function setup() {
10        $this->pluginsEnabled[] = 'strata';
11        parent::setUp();
12
13		// Setup a new database (uncomment the one to use)
14		//$this->_triples = new helper_plugin_stratastorage_triples();
15        $this->_triples = new helper_plugin_strata_triples();
16
17		// Use SQLite (default)
18		$this->_triples->_initialize('sqlite::memory:');
19
20		// Use MySQL, which is set up with:
21		// CREATE DATABASE strata_test;
22		// GRANT ALL ON strata_test.* TO ''@localhost;
23		//$this->_triples->initialize('mysql:dbname=strata_test');
24
25		// Use PostgreSQL, which is set up with:
26		// createuser -SDR strata
27		// createdb -l "en_US.UTF-8" -E UTF8 -T template0 strata_test
28		//$this->_triples->initialize('pgsql:dbname=strata_test;user=strata');
29
30	}
31
32	function teardown() {
33		// Remove the database
34		$this->_triples->_db->removeDatabase();
35	}
36}
37
38