Project on YII2. Roles are tested, all individually pass the test normally and two too, but when they are tested all at once, the test produces the following error for the third role:
Scenario Steps: 1071. $I->seeResponseCodeIs(200) at tests/functional/RoleCest.php:60 1070. $I->amOnRoute("/catalog/catalog/index") at tests/functional/RoleCest.php:48 PHP Fatal error: Uncaught Error: Call to a member function getDb() on null in /var/www/html/site.info/vendor/yiisoft/yii2/db/ActiveRecord.php:135 Stack trace: #0 /var/www/html/site.info/vendor/yiisoft/yii2/db/ActiveRecord.php(382): yii\db\ActiveRecord::getDb() #1 /var/www/html/site.info/vendor/yiisoft/yii2/db/ActiveRecord.php(418): yii\db\ActiveRecord::getTableSchema() #2 /var/www/html/site.info/vendor/yiisoft/yii2/db/BaseActiveRecord.php(492): yii\db\ActiveRecord->attributes() #3 /var/www/html/site.info/vendor/yiisoft/yii2/db/BaseActiveRecord.php(289): yii\db\BaseActiveRecord->hasAttribute('__mocked') #4 /var/www/html/site.info/vendor/yiisoft/yii2/db/BaseActiveRecord.php(335): yii\db\BaseActiveRecord->__get('__mocked') #5 /var/www/html/site.info/vendor/codeception/base/src/Codeception/Step.php(176): yii\db\BaseActiveRecord->__isset('__mocked') #6 /var/www/html/site.info/vendor/codeception/base/src/Codeception/Step.php(164): Codeception\Step->getC in /var/www/html/site.info/vendor/yiisoft/yii2/db/ActiveRecord.php on line 135 FATAL ERROR. TESTS NOT FINISHED. Uncaught Error: Call to a member function getDb() on null in /var/www/html/site.info/vendor/yiisoft/yii2/db/ActiveRecord.php:135 Stack trace: #0 /var/www/html/site.info/vendor/yiisoft/yii2/db/ActiveRecord.php(382): yii\db\ActiveRecord::getDb() #1 /var/www/html/site.info/vendor/yiisoft/yii2/db/ActiveRecord.php(418): yii\db\ActiveRecord::getTableSchema() #2 /var/www/html/site.info/vendor/yiisoft/yii2/db/BaseActiveRecord.php(492): yii\db\ActiveRecord->attributes() #3 /var/www/html/site.info/vendor/yiisoft/yii2/db/BaseActiveRecord.php(289): yii\db\BaseActiveRecord->hasAttribute('__mocked') #4 /var/www/html/site.info/vendor/yiisoft/yii2/db/BaseActiveRecord.php(335): yii\db\BaseActiveRecord->__get('__mocked') #5 /var/www/html/site.info/vendor/codeception/base/src/Codeception/Step.php(176): yii\db\BaseActiveRecord->__isset('__mocked') #6 /var/www/html/site.info/vendor/codeception/base/src/Codeception/Step.php(164): Codeception\Step->getC in /var/www/html/site.info/vendor/yiisoft/yii2/db/ActiveRecord.php:135 PHP Fatal error: Uncaught Error: Call to a member function has() on null in /var/www/html/site.info/vendor/yiisoft/yii2/web/ErrorHandler.php:91 Stack trace: #0 /var/www/html/site.info/vendor/yiisoft/yii2/base/ErrorHandler.php(262): yii\web\ErrorHandler->renderException(Object(yii\base\ErrorException)) #1 [internal function]: yii\base\ErrorHandler->handleFatalError() #2 {main} thrown in /var/www/html/site.info/vendor/yiisoft/yii2/web/ErrorHandler.php on line 91 It was thought that the problem was in the used memory, since the error always occurred in the place where the memory used by the test was displayed at 68 megabytes, no matter what role they started. Raised all the limits in php.ini FPM, codeception.yml, php.ini CLI, but this is probably not the problem. Tell me which way to dig.