Initial commit
This commit is contained in:
16
environments/test/common/config/codeception-local.php
Normal file
16
environments/test/common/config/codeception-local.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
return yii\helpers\ArrayHelper::merge(
|
||||
require __DIR__ . '/main.php',
|
||||
require __DIR__ . '/main-local.php',
|
||||
require __DIR__ . '/test.php',
|
||||
require __DIR__ . '/test-local.php',
|
||||
[
|
||||
'components' => [
|
||||
'request' => [
|
||||
// !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
|
||||
'cookieValidationKey' => '',
|
||||
],
|
||||
],
|
||||
]
|
||||
);
|
||||
13
environments/test/common/config/main-local.php
Normal file
13
environments/test/common/config/main-local.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'components' => [
|
||||
'db' => [
|
||||
'class' => \yii\db\Connection::class,
|
||||
'dsn' => 'mysql:host=mysql;dbname=app',
|
||||
'username' => 'app',
|
||||
'password' => '123',
|
||||
'charset' => 'utf8',
|
||||
],
|
||||
],
|
||||
];
|
||||
4
environments/test/common/config/params-local.php
Normal file
4
environments/test/common/config/params-local.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
];
|
||||
9
environments/test/common/config/test-local.php
Normal file
9
environments/test/common/config/test-local.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'components' => [
|
||||
'db' => [
|
||||
'dsn' => 'mysql:host=localhost;dbname=yii2advanced_test',
|
||||
],
|
||||
],
|
||||
];
|
||||
8
environments/test/console/config/main-local.php
Normal file
8
environments/test/console/config/main-local.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'bootstrap' => ['gii'],
|
||||
'modules' => [
|
||||
'gii' => 'yii\gii\Module',
|
||||
],
|
||||
];
|
||||
4
environments/test/console/config/params-local.php
Normal file
4
environments/test/console/config/params-local.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
];
|
||||
4
environments/test/console/config/test-local.php
Normal file
4
environments/test/console/config/test-local.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
];
|
||||
11
environments/test/frontend/config/codeception-local.php
Normal file
11
environments/test/frontend/config/codeception-local.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
return yii\helpers\ArrayHelper::merge(
|
||||
require dirname(dirname(__DIR__)) . '/common/config/codeception-local.php',
|
||||
require __DIR__ . '/main.php',
|
||||
require __DIR__ . '/main-local.php',
|
||||
require __DIR__ . '/test.php',
|
||||
require __DIR__ . '/test-local.php',
|
||||
[
|
||||
]
|
||||
);
|
||||
12
environments/test/frontend/config/main-local.php
Normal file
12
environments/test/frontend/config/main-local.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
$config = [
|
||||
'components' => [
|
||||
'request' => [
|
||||
// !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
|
||||
'cookieValidationKey' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
return $config;
|
||||
4
environments/test/frontend/config/params-local.php
Normal file
4
environments/test/frontend/config/params-local.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
];
|
||||
4
environments/test/frontend/config/test-local.php
Normal file
4
environments/test/frontend/config/test-local.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
];
|
||||
28
environments/test/frontend/web/index-test.php
Normal file
28
environments/test/frontend/web/index-test.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
// NOTE: Make sure this file is not accessible when deployed to production
|
||||
if (!in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', '::1'])) {
|
||||
die('You are not allowed to access this file.');
|
||||
}
|
||||
|
||||
defined('YII_DEBUG') or define('YII_DEBUG', true);
|
||||
defined('YII_ENV') or define('YII_ENV', 'test');
|
||||
|
||||
require __DIR__ . '/../../vendor/autoload.php';
|
||||
require __DIR__ . '/../../vendor/yiisoft/yii2/Yii.php';
|
||||
require __DIR__ . '/../../common/config/bootstrap.php';
|
||||
require __DIR__ . '/../config/bootstrap.php';
|
||||
|
||||
|
||||
$config = yii\helpers\ArrayHelper::merge(
|
||||
require __DIR__ . '/../../common/config/main.php',
|
||||
require __DIR__ . '/../../common/config/main-local.php',
|
||||
require __DIR__ . '/../../common/config/test.php',
|
||||
require __DIR__ . '/../../common/config/test-local.php',
|
||||
require __DIR__ . '/../config/main.php',
|
||||
require __DIR__ . '/../config/main-local.php',
|
||||
require __DIR__ . '/../config/test.php',
|
||||
require __DIR__ . '/../config/test-local.php'
|
||||
);
|
||||
|
||||
(new yii\web\Application($config))->run();
|
||||
18
environments/test/frontend/web/index.php
Normal file
18
environments/test/frontend/web/index.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
defined('YII_DEBUG') or define('YII_DEBUG', true);
|
||||
defined('YII_ENV') or define('YII_ENV', 'test');
|
||||
|
||||
require __DIR__ . '/../../vendor/autoload.php';
|
||||
require __DIR__ . '/../../vendor/yiisoft/yii2/Yii.php';
|
||||
require __DIR__ . '/../../common/config/bootstrap.php';
|
||||
require __DIR__ . '/../config/bootstrap.php';
|
||||
|
||||
$config = yii\helpers\ArrayHelper::merge(
|
||||
require __DIR__ . '/../../common/config/main.php',
|
||||
require __DIR__ . '/../../common/config/main-local.php',
|
||||
require __DIR__ . '/../config/main.php',
|
||||
require __DIR__ . '/../config/main-local.php'
|
||||
);
|
||||
|
||||
(new yii\web\Application($config))->run();
|
||||
2
environments/test/frontend/web/robots.txt
Normal file
2
environments/test/frontend/web/robots.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
User-agent: *
|
||||
Disallow: /
|
||||
24
environments/test/yii
Normal file
24
environments/test/yii
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/**
|
||||
* Yii console bootstrap file.
|
||||
*/
|
||||
|
||||
defined('YII_DEBUG') or define('YII_DEBUG', true);
|
||||
defined('YII_ENV') or define('YII_ENV', 'dev');
|
||||
|
||||
require __DIR__ . '/vendor/autoload.php';
|
||||
require __DIR__ . '/vendor/yiisoft/yii2/Yii.php';
|
||||
require __DIR__ . '/common/config/bootstrap.php';
|
||||
require __DIR__ . '/console/config/bootstrap.php';
|
||||
|
||||
$config = yii\helpers\ArrayHelper::merge(
|
||||
require __DIR__ . '/common/config/main.php',
|
||||
require __DIR__ . '/common/config/main-local.php',
|
||||
require __DIR__ . '/console/config/main.php',
|
||||
require __DIR__ . '/console/config/main-local.php'
|
||||
);
|
||||
|
||||
$application = new yii\console\Application($config);
|
||||
$exitCode = $application->run();
|
||||
exit($exitCode);
|
||||
28
environments/test/yii_test
Normal file
28
environments/test/yii_test
Normal file
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/**
|
||||
* Yii console bootstrap file.
|
||||
*/
|
||||
|
||||
defined('YII_DEBUG') or define('YII_DEBUG', true);
|
||||
defined('YII_ENV') or define('YII_ENV', 'test');
|
||||
|
||||
require __DIR__ . '/vendor/autoload.php';
|
||||
require __DIR__ . '/vendor/yiisoft/yii2/Yii.php';
|
||||
require __DIR__ . '/common/config/bootstrap.php';
|
||||
require __DIR__ . '/console/config/bootstrap.php';
|
||||
|
||||
$config = yii\helpers\ArrayHelper::merge(
|
||||
require __DIR__ . '/common/config/main.php',
|
||||
require __DIR__ . '/common/config/main-local.php',
|
||||
require __DIR__ . '/common/config/test.php',
|
||||
require __DIR__ . '/common/config/test-local.php',
|
||||
require __DIR__ . '/console/config/main.php',
|
||||
require __DIR__ . '/console/config/main-local.php',
|
||||
require __DIR__ . '/console/config/test.php',
|
||||
require __DIR__ . '/console/config/test-local.php'
|
||||
);
|
||||
|
||||
$application = new yii\console\Application($config);
|
||||
$exitCode = $application->run();
|
||||
exit($exitCode);
|
||||
15
environments/test/yii_test.bat
Normal file
15
environments/test/yii_test.bat
Normal file
@@ -0,0 +1,15 @@
|
||||
@echo off
|
||||
|
||||
rem -------------------------------------------------------------
|
||||
rem Yii command line bootstrap script for Windows.
|
||||
rem -------------------------------------------------------------
|
||||
|
||||
@setlocal
|
||||
|
||||
set YII_PATH=%~dp0
|
||||
|
||||
if "%PHP_COMMAND%" == "" set PHP_COMMAND=php.exe
|
||||
|
||||
"%PHP_COMMAND%" "%YII_PATH%yii_test" %*
|
||||
|
||||
@endlocal
|
||||
Reference in New Issue
Block a user