/** * @covers spriebsch\DB\DatabaseHandler::__call * @expectedException spriebsch\DB\DatabaseException */ public function testThrowsDatabaseExceptionWhenPdoObjectCannotBeCreated() { $db = new DatabaseHandler('nonsense'); $db->exec('SHOW TABLES'); }
/** * @covers spriebsch\DB\DatabaseHandler::__call * @expectedException spriebsch\DB\DatabaseException */ public function testThrowsDatabaseExceptionWhenPdoObjectCannotBeCreated() { $db = new DatabaseHandler('nonsense'); $db->exec('SHOW TABLES'); }