예제 #1
0
파일: ConfigTest.php 프로젝트: phlib/db
 /**
  * @expectedException \Phlib\Db\Exception\InvalidArgumentException
  */
 public function testGetDsnWithoutHost()
 {
     $config = new Config([]);
     $config->getDsn();
 }
예제 #2
0
 /**
  * @param Config $config
  * @return \PDO
  */
 public function create(Config $config)
 {
     return new \PDO($config->getDsn(), $config->getUsername(), $config->getPassword(), $config->getOptions());
 }