Missing table with Simpletest in CakePHP

I use cakePHP and use Simpletest as a test suite. Whenever I run tests on models, I get an error message:

Missing Database Table
Error: Database table account_types for model AccountType was not found."

(For whatever)

Does anyone know how to solve this problem?

I assume that lights are not being created or something like that.

+3
source share
2 answers

Found the answer to my specific problem. In real files of test cases (mine were in applications → tests → cases → models), the fixtures used were not automatically generated in the $ inventory variable.

, " ", , ( ) $fixture .

, account_types . , $fxtures, :

var $fixtures = array('whatever_fixtures_where_already_here', 'name_of_missing_fixture', 'name_of_another_missing_fixture');
+6

, , , , (hasMany, belongsTo ..)

+1

Source: https://habr.com/ru/post/1705506/


All Articles