Open havietduc91 opened 8 years ago
Do define dùng FunctionalTester $I nhưng ở trong file functional.suite.yml chưa include PhpBrowser vào? http://codeception.com/docs/modules/PhpBrowser#.VwSCrfl97IU class_name: FunctionalTester modules: enabled:
- PhpBrowser:
url: http://localhost:8888
- \Helper\Functional
Thêm dòng sau vào trong tests/_bootstrap.php
// This is global bootstrap for autoloading
require(__DIR__ . '/../vendor/autoload.php');
require(__DIR__ . '/../vendor/yiisoft/yii2/Yii.php');
$config = require(__DIR__ . '/../config/console.php');
//
$application = new yii\console\Application( $config );
class_name: UnitTester
modules:
enabled:
- Asserts
- \Helper\Unit
- Yii2
- Db
config:
Yii2:
cleanup: true
configFile: 'tests/codeception/config/unit.php'
Db:
dsn: 'mysql:host=localhost;dbname=needseeker_marketing_platform'
user: 'root'
password: ''
dump: 'tests/codeception/_data/dump.sql'
cleanup: true
Sau khi thêm phần đó chạy lại vendor/bin/codecept build