Hi,
I have written many unit tests classes and in order to get things simple, I have also distributed fixtures into sub-folder. Here is the structure :
./tests
--- fixtures
model1.php
model2.php
--- set1
model1.php
model2.php
--- unit
A_Test.php
B_Test.php
A_Test uses fixtures in ./fixture, and B_Test uses the ones in ./fixture/set1, by changing the fixtureManager basePath :
protected function setUp()
{
$this->getFixtureManager()
->basePath = Yii::getPathOfAlias('application.tests.fixtures.set1');
parent::setUp();
}
Now everything works fine when I run both unit test cases individually, but when I try to run all tests cases in folder ./unit (using % phpunit --coverage-html ./report unit), fixtures stored in the set1 subfolder are not applied, and of course, B_Test fails.
Any idea why this happens is very welcome.
ciao