Coldbox Testing Model

Use this skill when unit testing ColdBox model objects (services, repositories, entities, or utility classes) in isolation using BaseModelTest, accessing the pre-wired model variable, leveraging the built-in mock helpers (mockLogger, mockLogBox, mockCacheBox, mockWireBox), calling model.init() to initialize the component, mocking injected properties with prepareMock(), or scaffolding model tests with CommandBox.

ColdBox bd8440f 7.3 KB Updated

File contents

ColdBox/skills/tree/main/coldbox/testing-model commit bd8440f1ad

Frequently asked questions

npx skillmds@latest add coldbox/coldbox-testing-model