Ejemplo n.º 1
0
 /**
  * Test whether connection failure does not reveal
  * credentials.
  * 
  * @return void
  */
 public function testConnect()
 {
     $driver = new RPDO('dsn:invalid', 'usr', 'psst');
     try {
         $driver->connect();
         fail();
     } catch (\PDOException $e) {
         asrt(strpos($e->getMessage(), 'invalid'), FALSE);
         asrt(strpos($e->getMessage(), 'usr'), FALSE);
         asrt(strpos($e->getMessage(), 'psst'), FALSE);
     }
 }