Rework tests structure. Upgrade codeception to 2.5.3. Merge params configuration into app configuration.

This commit is contained in:
ErickSkrauch
2019-02-20 22:58:52 +03:00
parent 2eacc581be
commit b05dc6816e
248 changed files with 1503 additions and 1339 deletions

View File

@@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
namespace common\config;
use yii\helpers\ArrayHelper;

View File

@@ -1,4 +1,3 @@
<?php
Yii::setAlias('common', dirname(__DIR__));
Yii::setAlias('api', dirname(__DIR__, 2) . '/api');
Yii::setAlias('console', dirname(__DIR__, 2) . '/console');
// Do not use Yii2 autoloader and left it to the composer
spl_autoload_unregister(['Yii', 'autoload']);

View File

@@ -0,0 +1,23 @@
<?php
return [
'id' => 'common-tests',
'basePath' => dirname(__DIR__),
'params' => [
'fromEmail' => 'ely@ely.by',
],
'components' => [
'security' => [
// It's allows us to increase tests speed by decreasing password hashing algorithm complexity
'passwordHashCost' => 4,
],
'queue' => [
'class' => common\tests\_support\queue\Queue::class,
],
'sentry' => [
'enabled' => false,
],
'mailer' => [
'useFileTransport' => true,
],
],
];

View File

@@ -2,6 +2,24 @@
return [
'version' => '{{PLACE_VERSION_HERE}}', // This will be replaced by build tool
'vendorPath' => dirname(__DIR__, 2) . '/vendor',
'aliases' => [
'@bower' => '@vendor/bower-asset',
'@npm' => '@vendor/npm-asset',
'@root' => dirname(__DIR__, 2),
'@api' => '@root/api',
'@common' => '@root/common',
'@console' => '@root/console',
],
'params' => [
'fromEmail' => 'ely@ely.by',
'supportEmail' => 'support@ely.by',
],
'container' => [
'definitions' => [
GuzzleHttp\ClientInterface::class => GuzzleHttp\Client::class,
],
],
'components' => [
'cache' => [
'class' => yii\redis\Cache::class,
@@ -91,13 +109,4 @@ return [
'class' => yii\queue\redis\Queue::class,
],
],
'container' => [
'definitions' => [
GuzzleHttp\ClientInterface::class => GuzzleHttp\Client::class,
],
],
'aliases' => [
'@bower' => '@vendor/bower-asset',
'@npm' => '@vendor/npm-asset',
],
];

View File

@@ -1,5 +0,0 @@
<?php
return [
'fromEmail' => 'ely@ely.by',
'supportEmail' => 'support@ely.by',
];