How to auto load some fixtures for functional testing?


Till the version 2.0.6 I used to do testing finely. But I needed to stop coding for some months and now we have 2.0.10 but we dont have a FixtureHelper anymore, or at least I could not find it, and we even dont have a yii2-codeception anymore (deprecated, in fact).

So, how can we set the fixtures that should be auto loaded before running functional testing (and unloaded after)? Should we "implement" our own FixtureHelper? Should we use haveInDb([…]) for each register? Have anyone some idea how to achieve this for functional testing in 2.0.10?

Thank you so much for any help.

OBS: I have already searched in the Yii2 Docs (guide and src), in the own codeception docs and other sites but I was not able to find a simple solution, not even a not simple.

What is FixtureHelper? This is not a class provided by Yii. We do not remove things in 2.0.x releases.

Also the deprecation of codeception extension does not mean you can not use it anymore, it is just discontinued because native

support of codeception is much better than the extension so the extension will not receive new features anymore.

I can not help you with fixtures on functional tests as I never used that in codeception but what worked in 2.0.6 should still work on 2.0.10.

Ok Cebe, thanks for your answer but now, please, try to find FixtureHelper in the current version. It is not there anymore. So, we can’t autoload fixtures for functional testing anymore, at least not using FixtureHelper.

Yeah, I think Yii is going out of fixture things for testing and letting coders use codeception tools to do it. Unfortunately it is an ease less but we certainly can work around in some way. I just have to figure out what way! LOL

Thank you again.

Related Issue: