[coldbox-3.5.1] BaseModelTest doesn't know getWireBox()

hi there

i’m quite new to coldbox. i wanted to write a test-class, extending coldbox.system.testing.BaseModelTest. in the setup-function i can use getMockBox(), that works, but i need getWireBox(), too and that one returns an error that the method was not found. according to the apidocs it should exist, though. or did i get something wrong?

in my config-file i have wirebox turned on:

wireBox = {
enabled = true,

does anyone have any idea, what i’m doing wrong?

tanks in advance



You are using the “BaseModelTest”, which means you are testing your model CFC’s in isolation, meaning nothing in your ColdBox application is linked. However, if you read the docs, when you use the BaseModelTest, we create some variables for you in the “variables” scope


You can use the mockWireBox variable to mock whatever dependency you need.

Luis F. Majano
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

Thanks a lot Luis, now it works!