Example #1
0
 /**
  * @param string $dsn  DSN
  * @param string $host Host
  *
  * @dataProvider hostValues
  */
 public function testHost($dsn, $host)
 {
     $dsn = new DSN($dsn);
     if (is_array($host)) {
         foreach ($dsn->getHosts() as $index => $h) {
             $this->assertEquals($host[$index], $h['host']);
         }
     } else {
         $this->assertEquals($host, $dsn->getFirstHost());
     }
 }