Hi
I have wrote some Test-Cases which run correctly if i run every Case
by hand. But If i run it from a Test-Group i got "Missing Database
Table" at different positions. I try this to reproduce the error:
- Got the latest Brunch from SVN
- Configured Database, Temp-Dir, ...
- Baked a Model, a Controller and Views for one table (the only table
in the db)
- Test the two baked Test-Cases - they run correctly
- Then i created this Test-Group:
class AllAllGroupTest extends GroupTest {
public $label = 'Tests all';
protected $directory = array( 'models', 'controllers',);
public function __construct() {
foreach($this->directory as $directory){
TestManager::addTestCasesFromDirectory($this,
APP_TEST_CASES.DS.
$directory);
}
}
}
If i run this Test-Group, i got a "Missing Database Table" error. But
if i switch the two directory's to array('controllers', 'models', ),
the both Test-Cases runs whit out any error.
For me it looks like the database connection is not correctly set back
to 'default' before the models do a 'describe ...' to the database and
the fixtures are not loaded at this time.
It doesn't only happens in this, a lite bit searched, case. I saw this
the first time when i created the first component test. And in my eyes
the order of the Cases should not do any difference to a Test.
Is this a bug or how can i avoid that?
Thanks for any Help
Den
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---