mock<T> method
Replace a dependency with a mock/fake implementation
This will forcefully delete the existing dependency and register the mock in its place.
Implementation
ZenTestMode mock<T>(T instance, {String? tag}) {
ZenLogger.logDebug('🧪 Test Mode: Mocking $T${tag != null ? ':$tag' : ''}');
// Delete existing if present
Zen.delete<T>(tag: tag, force: true);
// Register mock
Zen.put<T>(instance, tag: tag);
return this;
}