blob: ba664c3aae30440fd3fa6e3793cbe8419df4b8ff (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
<?php
require_once __DIR__.'/../vendor/PicoDb/Database.php';
require_once __DIR__.'/../core/event.php';
require_once __DIR__.'/../core/translator.php';
require_once __DIR__.'/../models/schema.php';
require_once __DIR__.'/../models/task.php';
require_once __DIR__.'/../models/acl.php';
require_once __DIR__.'/../models/comment.php';
require_once __DIR__.'/../models/project.php';
require_once __DIR__.'/../models/user.php';
require_once __DIR__.'/../models/board.php';
require_once __DIR__.'/../models/action.php';
require_once __DIR__.'/../actions/task_close.php';
require_once __DIR__.'/../actions/task_assign_specific_user.php';
require_once __DIR__.'/../actions/task_assign_color_user.php';
require_once __DIR__.'/../actions/task_assign_current_user.php';
require_once __DIR__.'/../actions/task_duplicate_another_project.php';
abstract class Base extends PHPUnit_Framework_TestCase
{
public function setUp()
{
$this->db = $this->getDbConnection();
$this->event = new \Core\Event;
}
public function getDbConnection()
{
$db = new \PicoDb\Database(array(
'driver' => 'sqlite',
'filename' => ':memory:'
));
if ($db->schema()->check(10)) {
return $db;
}
else {
die('Unable to migrate database schema!');
}
}
}
|