init() public static method

init the class
Since: 2.6.0
public static init ( )
Exemplo n.º 1
0
 /**
  * testInit
  *
  * @since 2.2.0
  */
 public function testInit()
 {
     /* setup */
     Db::init($this->_config);
     /* result */
     $result = Db::getDb();
     /* compare */
     $this->assertInstanceOf('PDO', $result);
 }
Exemplo n.º 2
0
 /**
  * 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);
 }
Exemplo n.º 3
0
 /**
  * refresh the connection
  *
  * @since 3.0.0
  *
  * @return array
  */
 protected function _refresh()
 {
     Db::init();
     Db::resetDb();
 }