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,
//binder=“config.WireBox”,
singletonReload=true
};
does anyone have any idea, what i’m doing wrong?
tanks in advance
tanja
Tanja,
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
http://wiki.coldbox.org/wiki/Testing.cfm#Model_Object_Testing
You can use the mockWireBox variable to mock whatever dependency you need.
Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com
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!