initial commit
This commit is contained in:
7
tests/codeception/config/acceptance.php
Normal file
7
tests/codeception/config/acceptance.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* Application configuration shared by all applications acceptance tests
|
||||
*/
|
||||
return [
|
||||
|
||||
];
|
||||
17
tests/codeception/config/backend/acceptance.php
Normal file
17
tests/codeception/config/backend/acceptance.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
defined('YII_APP_BASE_PATH') or define('YII_APP_BASE_PATH', dirname(dirname(dirname(dirname(__DIR__)))));
|
||||
|
||||
/**
|
||||
* Application configuration for backend acceptance tests
|
||||
*/
|
||||
return yii\helpers\ArrayHelper::merge(
|
||||
require(YII_APP_BASE_PATH . '/common/config/main.php'),
|
||||
require(YII_APP_BASE_PATH . '/common/config/main-local.php'),
|
||||
require(YII_APP_BASE_PATH . '/backend/config/main.php'),
|
||||
require(YII_APP_BASE_PATH . '/backend/config/main-local.php'),
|
||||
require(dirname(__DIR__) . '/config.php'),
|
||||
require(dirname(__DIR__) . '/acceptance.php'),
|
||||
require(__DIR__ . '/config.php'),
|
||||
[
|
||||
]
|
||||
);
|
||||
5
tests/codeception/config/backend/config.php
Normal file
5
tests/codeception/config/backend/config.php
Normal file
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
/**
|
||||
* Application configuration for all backend test types
|
||||
*/
|
||||
return [];
|
||||
18
tests/codeception/config/backend/functional.php
Normal file
18
tests/codeception/config/backend/functional.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
$_SERVER['SCRIPT_FILENAME'] = YII_TEST_BACKEND_ENTRY_FILE;
|
||||
$_SERVER['SCRIPT_NAME'] = YII_BACKEND_TEST_ENTRY_URL;
|
||||
|
||||
/**
|
||||
* Application configuration for backend functional tests
|
||||
*/
|
||||
return yii\helpers\ArrayHelper::merge(
|
||||
require(YII_APP_BASE_PATH . '/common/config/main.php'),
|
||||
require(YII_APP_BASE_PATH . '/common/config/main-local.php'),
|
||||
require(YII_APP_BASE_PATH . '/backend/config/main.php'),
|
||||
require(YII_APP_BASE_PATH . '/backend/config/main-local.php'),
|
||||
require(dirname(__DIR__) . '/config.php'),
|
||||
require(dirname(__DIR__) . '/functional.php'),
|
||||
require(__DIR__ . '/config.php'),
|
||||
[
|
||||
]
|
||||
);
|
||||
16
tests/codeception/config/backend/unit.php
Normal file
16
tests/codeception/config/backend/unit.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Application configuration for backend unit tests
|
||||
*/
|
||||
return yii\helpers\ArrayHelper::merge(
|
||||
require(YII_APP_BASE_PATH . '/common/config/main.php'),
|
||||
require(YII_APP_BASE_PATH . '/common/config/main-local.php'),
|
||||
require(YII_APP_BASE_PATH . '/backend/config/main.php'),
|
||||
require(YII_APP_BASE_PATH . '/backend/config/main-local.php'),
|
||||
require(dirname(__DIR__) . '/config.php'),
|
||||
require(dirname(__DIR__) . '/unit.php'),
|
||||
require(__DIR__ . '/config.php'),
|
||||
[
|
||||
]
|
||||
);
|
||||
14
tests/codeception/config/common/unit.php
Normal file
14
tests/codeception/config/common/unit.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* Application config for common unit tests
|
||||
*/
|
||||
return yii\helpers\ArrayHelper::merge(
|
||||
require(YII_APP_BASE_PATH . '/common/config/main.php'),
|
||||
require(YII_APP_BASE_PATH . '/common/config/main-local.php'),
|
||||
require(dirname(__DIR__) . '/config.php'),
|
||||
require(dirname(__DIR__) . '/unit.php'),
|
||||
[
|
||||
'id' => 'app-common',
|
||||
'basePath' => dirname(__DIR__),
|
||||
]
|
||||
);
|
||||
26
tests/codeception/config/config.php
Normal file
26
tests/codeception/config/config.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?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=yii2_advanced_tests',
|
||||
],
|
||||
'mailer' => [
|
||||
'useFileTransport' => true,
|
||||
],
|
||||
'urlManager' => [
|
||||
'showScriptName' => true,
|
||||
],
|
||||
],
|
||||
];
|
||||
14
tests/codeception/config/console/unit.php
Normal file
14
tests/codeception/config/console/unit.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* Application configuration for console unit tests
|
||||
*/
|
||||
return yii\helpers\ArrayHelper::merge(
|
||||
require(YII_APP_BASE_PATH . '/common/config/main.php'),
|
||||
require(YII_APP_BASE_PATH . '/common/config/main-local.php'),
|
||||
require(YII_APP_BASE_PATH . '/console/config/main.php'),
|
||||
require(YII_APP_BASE_PATH . '/console/config/main-local.php'),
|
||||
require(dirname(__DIR__) . '/config.php'),
|
||||
require(dirname(__DIR__) . '/unit.php'),
|
||||
[
|
||||
]
|
||||
);
|
||||
17
tests/codeception/config/frontend/acceptance.php
Normal file
17
tests/codeception/config/frontend/acceptance.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
defined('YII_APP_BASE_PATH') or define('YII_APP_BASE_PATH', dirname(dirname(dirname(dirname(__DIR__)))));
|
||||
|
||||
/**
|
||||
* Application configuration for frontend acceptance tests
|
||||
*/
|
||||
return yii\helpers\ArrayHelper::merge(
|
||||
require(YII_APP_BASE_PATH . '/common/config/main.php'),
|
||||
require(YII_APP_BASE_PATH . '/common/config/main-local.php'),
|
||||
require(YII_APP_BASE_PATH . '/frontend/config/main.php'),
|
||||
require(YII_APP_BASE_PATH . '/frontend/config/main-local.php'),
|
||||
require(dirname(__DIR__) . '/config.php'),
|
||||
require(dirname(__DIR__) . '/acceptance.php'),
|
||||
require(__DIR__ . '/config.php'),
|
||||
[
|
||||
]
|
||||
);
|
||||
5
tests/codeception/config/frontend/config.php
Normal file
5
tests/codeception/config/frontend/config.php
Normal file
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
/**
|
||||
* Application configuration for all frontend test types
|
||||
*/
|
||||
return [];
|
||||
18
tests/codeception/config/frontend/functional.php
Normal file
18
tests/codeception/config/frontend/functional.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
$_SERVER['SCRIPT_FILENAME'] = FRONTEND_ENTRY_FILE;
|
||||
$_SERVER['SCRIPT_NAME'] = FRONTEND_ENTRY_URL;
|
||||
|
||||
/**
|
||||
* Application configuration for frontend functional tests
|
||||
*/
|
||||
return yii\helpers\ArrayHelper::merge(
|
||||
require(YII_APP_BASE_PATH . '/common/config/main.php'),
|
||||
require(YII_APP_BASE_PATH . '/common/config/main-local.php'),
|
||||
require(YII_APP_BASE_PATH . '/frontend/config/main.php'),
|
||||
require(YII_APP_BASE_PATH . '/frontend/config/main-local.php'),
|
||||
require(dirname(__DIR__) . '/config.php'),
|
||||
require(dirname(__DIR__) . '/functional.php'),
|
||||
require(__DIR__ . '/config.php'),
|
||||
[
|
||||
]
|
||||
);
|
||||
16
tests/codeception/config/frontend/unit.php
Normal file
16
tests/codeception/config/frontend/unit.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Application configuration for frontend unit tests
|
||||
*/
|
||||
return yii\helpers\ArrayHelper::merge(
|
||||
require(YII_APP_BASE_PATH . '/common/config/main.php'),
|
||||
require(YII_APP_BASE_PATH . '/common/config/main-local.php'),
|
||||
require(YII_APP_BASE_PATH . '/frontend/config/main.php'),
|
||||
require(YII_APP_BASE_PATH . '/frontend/config/main-local.php'),
|
||||
require(dirname(__DIR__) . '/config.php'),
|
||||
require(dirname(__DIR__) . '/unit.php'),
|
||||
require(__DIR__ . '/config.php'),
|
||||
[
|
||||
]
|
||||
);
|
||||
18
tests/codeception/config/functional.php
Normal file
18
tests/codeception/config/functional.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
/**
|
||||
* Application configuration shared by all applications functional tests
|
||||
*/
|
||||
return [
|
||||
'components' => [
|
||||
'request' => [
|
||||
// it's not recommended to run functional tests with CSRF validation enabled
|
||||
'enableCsrfValidation' => false,
|
||||
// but if you absolutely need it set cookie domain to localhost
|
||||
/*
|
||||
'csrfCookie' => [
|
||||
'domain' => 'localhost',
|
||||
],
|
||||
*/
|
||||
],
|
||||
],
|
||||
];
|
||||
7
tests/codeception/config/unit.php
Normal file
7
tests/codeception/config/unit.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* Application configuration shared by all applications unit tests
|
||||
*/
|
||||
return [
|
||||
|
||||
];
|
||||
Reference in New Issue
Block a user