getDb() public static method

Get DB connection
public static getDb ( ) : Db
return Db
Ejemplo n.º 1
0
 public function testGetDbException()
 {
     $this->setExpectedException('Pop\\Db\\Exception');
     $this->assertInstanceOf('Pop\\Db\\Db', Record::getDb());
 }
Ejemplo n.º 2
0
 public function testGetDefaultDb()
 {
     Record::setDb(Db::factory('Sqlite', array('database' => __DIR__ . '/../tmp/test.sqlite')), true);
     $this->assertInstanceOf('Pop\\Db\\Db', Record::getDb());
 }