Codeception and Advanced Application template

It is really cool that the advanced app template has Codeception tests…

But how do you create new tests ?

I want to create a unit test in the common dir for the User model.

What directory exactly am I supposed to be in and what command do I need to be making? :)

I can build and run the existing tests but that is not really useful to me - I need to be able to create tests.

Codeception docs does not take the special layout that the advanced app has into account…

So, I navigated to tests/codeception/common and ran the following command:

codecept generate:phpunit unit models/UserTest

I assume that is what you need to do, right?

Or, if we want to use Codeception powered unit tests:

codecept generate:test unit models/UserTest

It looks like the unit tests shipped with the advanced template does not use Codeception style unit tests but phpunit style unit tests because I don’t see the overridden _before and _after methods, am I right?

I wish that the documentation for this was more complete ???

I take it that none of you guys are actually using Codeception ? :)

Yep, exactly as I did it.

Thanks Duri :)

At least that makes two of us.

I am currently learning from Dektrium/yii2-user - they have some neat Codeception testing code :)