factory() public static method

Create a new Database object based on PDO constructors
public static factory ( string $dsn, string $username = '', string $password = '', array $options = [] ) : Database
$dsn string
$username string
$password string
$options array
return Database
Ejemplo n.º 1
0
 public function testZCleanup()
 {
     try {
         $db = Database::factory($this->getConfig());
     } catch (DBException $ex) {
         $this->markTestSkipped('Database not configured');
         return;
     }
     $db->safeQuery('DELETE FROM test_values');
 }