Bit of a cross post from the box slack so I apolog...
# testing
a
Bit of a cross post from the box slack so I apologise for anyone seeing this twice... I use a beanfactory (originally DI1 now Wirebox) to wire up dependancies in my unit tests. This is not a ColdBox app. So I setup the beanfactory with mocks for each of the dependancies and then get the wired up subject under test from the beanfactory. This has worked great for years (I like it as it's also testing the syntax to wire in the dependancies is correct), however with Wirebox 7 it no longer works. So how do people wire up dependancies? Do you just manually call the setters (with mocks)?
paring it back to a simple example does work as I'd expect so must be something quirky in the code.
figured it out if anyone cares. Seems that current tests depend on mocks being to the same reference each time so will update the tests to get the injected mocks rather than referencing from wirebox
👍🏼 1
👍 1
some of these tests are quite old so over-due for a refactor 🙂
👍🏼 1
l
let us know if we have a regression
a
To be honest I don't know. Some tests fail, not sure if the way they were set up "happened to work" rather than "should work"
l
try disabling the transient cache
a
Ah - that's it!
Magic - that's been blocking my upgrade path for a couple of weeks.