aboutsummaryrefslogtreecommitdiffstats
path: root/tests/fakes/fake_dba.php
blob: 2289f5c80cfb662196e4a0fe8f68efd792cf6056 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php
namespace Zotlabs\Tests\Fakes;

require_once 'include/dba/dba_pdo.php';

/**
 * Fake dba_driver implementation.
 *
 * This is a subclass of the dba_pdo class, that essentially lets us inject a
 * stub for the PDO class that is the actual database driver.
 */
class FakeDba extends \dba_pdo {
	public function __construct($stub) {
		$this->db = $stub;
		$this->connected = true;
	}
}