/** * Destroys database handler and singleton instance. * * Useful for unit tests. * @return null Null database handler */ public static function destroyInstance() { if (self::$db !== null) { self::$db->Destroy(); self::$db = null; } return self::$db; }