tonydspaniard / yiinitializr-advanced

Yii Framework project structure boilerplate for advanced application requirements
67 stars 30 forks source link

Codeception setup #10

Open fuzzek opened 11 years ago

fuzzek commented 11 years ago

Hi Tony, just starting to play with composer and yiinitializr. Before I used yii-environment in my projects.. everything works really great so far with setup, but I try to encapsulate codeception (specially config).

My structure is inspired with phundament/app:

(my protected/tests directory) scr

to run unit tests I need bootstrap.php (yii setup with test config). Do you thing that I need to create new environment like test-unit? Is there a way to quickly change env with composer or just change it in env.lock?

Jack

tonydspaniard commented 11 years ago

I think the best way is to create new environment, nevertheless, I highly recommend you to have a look at the new mocking features implemented by Michael in Codeception. Will invite him to help you out on this.

DavertMik commented 11 years ago

If you are going to get tested a few applications (frontend and backend) you should use test structure that involves namespaces.

http://codeception.com/docs/08-Customization

Actually there will be one global codeception.yml in the root to rule them all and suites in frontend/tests, backend/tests, api/tests.

As for environment, yes, you should add test env for all those applications.

Borales commented 11 years ago

@DavertMik should we use this module in functional suite? I mean, how can I set up Codeception right to use it with several config files (common/config + app config + env config)?