/** * Test to make sure that a de-registered driver cannot * be used. */ public function testUnregisterDriver() { Creole::deregisterDriver('mysql'); try { $driver = Creole::getConnection('mysql://hostname/dbname'); $this->fail("Expected SQLException to be thrown by attempt to connect to unregistered driver type."); } catch (SQLException $e) { $this->expectException("No driver has been registered to handle connection type: mysql", $e); } // now put it back :) Creole::registerDriver('mysql', 'creole.drivers.mysql.MySQLConnection'); }