getDb() 공개 정적인 메소드

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