コード例 #1
0
ファイル: DbTest.php プロジェクト: ITw3/redaxscript
 /**
  * testInit
  *
  * @since 2.2.0
  */
 public function testInit()
 {
     /* setup */
     Db::init($this->_config);
     /* result */
     $result = Db::getDb();
     /* compare */
     $this->assertInstanceOf('PDO', $result);
 }
コード例 #2
0
ファイル: DbTest.php プロジェクト: EtienneBruines/redaxscript
 /**
  * testInit
  *
  * @since 2.2.0
  *
  * @param string $dbType
  *
  * @dataProvider providerDb
  */
 public function testInit($dbType = null)
 {
     /* setup */
     $this->_config->set('dbType', $dbType);
     Db::init($this->_config);
     /* actual */
     $actual = Db::getDb();
     /* compare */
     $this->assertInstanceOf('PDO', $actual);
 }