Exemplo n.º 1
0
 /**
  * @expectedException \Phlib\Db\Exception\InvalidArgumentException
  */
 public function testGetDsnWithoutHost()
 {
     $config = new Config([]);
     $config->getDsn();
 }
Exemplo n.º 2
0
 /**
  * @param Config $config
  * @return \PDO
  */
 public function create(Config $config)
 {
     return new \PDO($config->getDsn(), $config->getUsername(), $config->getPassword(), $config->getOptions());
 }