Fix test DB setup
This commit is contained in:
parent
6c58cf1d90
commit
484d35d3ce
@ -10,15 +10,15 @@ abstract class APTestCase extends TestCase
|
|||||||
|
|
||||||
private static $pdo = null;
|
private static $pdo = null;
|
||||||
private $conn = null;
|
private $conn = null;
|
||||||
private $dbPath = '';
|
protected $dbPath = '';
|
||||||
|
|
||||||
final public function getConnection() {
|
final public function getConnection() {
|
||||||
if ( $this->conn === null ) {
|
if ( $this->conn === null ) {
|
||||||
if ( self::$pdo === null ) {
|
if ( self::$pdo === null ) {
|
||||||
$this->dbPath = dirname( __FILE__ ) . '../db.sqlite';
|
$this->dbPath = dirname( __FILE__ ) . '/../db.sqlite';
|
||||||
self::$pdo = new \PDO( "sqlite:{$this->dbPath}" );
|
self::$pdo = new \PDO( "sqlite:{$this->dbPath}" );
|
||||||
}
|
}
|
||||||
$this->conn = $this->createDefaultConnection( self::$pdo, $this->dbPath );
|
$this->conn = $this->createDefaultDBConnection( self::$pdo, $this->dbPath );
|
||||||
}
|
}
|
||||||
return $this->conn;
|
return $this->conn;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user