Add custom type in test case

If we have to load some custom type, actually we only can use addType() from $factory that send a E_DEPRECATED error and phpunit failed! I added method addTypes() to allow dev to overload this method to add their own types like addExtension() method.