atoum / AtoumBundle

This bundle provides a simple integration of atoum into Symfony 2.
MIT License
44 stars 25 forks source link

Problem with Symfony 3.0 directory structure #70

Open marmotz opened 10 years ago

marmotz commented 10 years ago

For my new project, I use Symfony 2.5 and I choose the new directory structure (http://stackoverflow.com/questions/23993295/what-is-the-new-symfony-3-directory-structure#23994473)

Unfortunatly, when I launch AtoumBundle tests, app/cache and app/config was created.

geraldcroes commented 10 years ago

Thx for this issue.

Can you be more specific on the expected behaviour with Symfony 3 and its new directory structure ?

Looking through it, I guess files currently in app/cache should now be located in var/cache. But I didn't find anything related to app/config.

I could obviously look into it, but any help would be greatly appreciated.

marmotz commented 10 years ago

Sorry, app/config is always in app :)

It's just app/cache -> var/cache (and maybe app/log -> var/log but I can't test for now, maybe tonight)

Tom32i commented 9 years ago

Same problem here, I use Symfony 3.0 directory structure, so the Cache directory (%kernel.cache_dir%) is var/cache by default.

When Atoum runs, it build the cache in app/cache instead. I don't know from where it gets this wrong path, it should use the same Kernel the Symfony app use.

Is there any way to override this path in Atoum? Does someone knows where this path is calculated?

Tom32i commented 9 years ago

All right, I found a solution: you have to tell Atoum to work with var/bootstrap.php.cache instead of app/autoload.php. Fortunately there is an option doing just that in the Atoum command line:

bin/console atoum --bootstrap-file=var/bootstrap.php.cache --env=test

Then the Kernel instance in Atoum will behave exactly as the ones in your app_test.php.