php - Fatal error: Class 'CDbTestCase' not found -


i'm new in php , have testing app. i'm trying make unit testing error messages displayed. have many weeks ago , cannot fix it, please me!!

the message says: fatal error: class 'cdbtestcase' not found.

i read , follow many tutorials issue doesn't work.

i'm using yii, eclipse ide , composer.

i think problem in bootstrap.php don't use because i'm working composer, composer.json

{     "require-dev": {         "yiisoft/yii": "1.1.*",         "phpunit/phpunit": "4.6.*",         "phpunit/phpunit-selenium": ">=1.2",         "codeception/codeception":"*",         "phpunit/dbunit": ">=1.2"     },      "autoload": {         "psr-0": {"": "vendor/autoload.php"},         "psr-4": {"": "/../framework/test/cdbtestcase.php"}     } } 

the bootstrap file needed load yii framework. cdbtestcase part of yii framework failing include yii give error if tests depend on yii's unit test related classes.

use included bootstrap file , make sure include composer's autoload.php file. add yii config file (i believe default, yii uses test.php config file custom testing related settings. can include autoload.php inside file)

somewhere @ top of yii config file

// include composer autoload require_once 'path/to/composer/vendor/autoload.php'; 

Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -