Hello all.
I have a fortnight (very big) problem. And don’t understand what am I doing wrong.
www/tests/codeception/frontend/codeception.yml
namespace: tests\codeception\frontend
actor: Tester
paths:
tests: .
log: _output
data: _data
helpers: _support
settings:
bootstrap: _bootstrap.php
suite_class: \PHPUnit_Framework_TestSuite
colors: true
memory_limit: 1024M
log: true
config:
# the entry script URL (with host info) for functional and acceptance tests
# PLEASE ADJUST IT TO THE ACTUAL ENTRY SCRIPT URL
test_entry_url: mysite.com
modules:
config:
Db:
dsn: 'mysql:host=localhost;dbname=mydb.yii2_tests'
user: 'root'
password: 'passw'
cleanup: true
www/tests/codeception/config/config.php
<?php
/**
* Application configuration shared by all applications and test types
*/
return [
'language' => 'en-US',
'controllerMap' => [
'fixture' => [
'class' => 'yii\faker\FixtureController',
'fixtureDataPath' => '@tests/codeception/common/fixtures/data',
'templatePath' => '@tests/codeception/common/templates/fixtures',
'namespace' => 'tests\codeception\common\fixtures',
],
],
'components' => [
'db' => [
'dsn' => 'mysql:host=localhost;dbname=mydb.yii2_tests',
'username' => 'root',
'password' => 'passw',
],
'mailer' => [
'useFileTransport' => true,
],
'urlManager' => [
'enablePrettyUrl' => true,
'showScriptName' => false,
],
],
];
www/tests/codeception/frontend/acceptance.suite.yml
class_name: AcceptanceTester
modules:
enabled:
- WebDriver
- tests\codeception\common\_support\FixtureHelper
- Db
config:
WebDriver:
url: mysite.yii2
browser: firefox
During testing codeception insert data in my main DB (not mydb.yii2_tests). Why?
What i need to do?