1: <?php
2:
3: /**
4: * Avisota newsletter and mailing system
5: *
6: * PHP Version 5.3
7: *
8: * @copyright bit3 UG 2013
9: * @author Tristan Lins <tristan.lins@bit3.de>
10: * @package avisota-core
11: * @license LGPL-3.0+
12: * @link http://avisota.org
13: */
14:
15: namespace Avisota\Test\Database;
16:
17: use Doctrine\DBAL\Configuration;
18: use Doctrine\DBAL\Connection;
19: use Doctrine\DBAL\DriverManager;
20:
21: class SqliteDoctrineConnectionProvider implements DoctrineConnectionProviderInterface
22: {
23: /**
24: * @return Connection
25: */
26: public function createDoctrineConnection()
27: {
28: $config = new Configuration();
29:
30: $connectionParams = array(
31: 'user' => 'user',
32: 'password' => 'secret',
33: 'memory' => true,
34: 'driver' => 'pdo_sqlite',
35: );
36:
37: $connection = DriverManager::getConnection($connectionParams, $config);
38:
39: return $connection;
40: }
41: }
42: