M
M
monday_suicide2020-10-12 00:11:08
Yii
monday_suicide, 2020-10-12 00:11:08

I can't figure out what's wrong with testing?

Hello. When running the test, it gives the following error:

[yii\base\UnknownPropertyException] Setting unknown property: yii\web\Application::adminEmail

#1  /var/www/images/vendor/yiisoft/yii2/base/Component.php:209
#2  /var/www/images/vendor/yiisoft/yii2/BaseYii.php:558
#3  /var/www/images/vendor/yiisoft/yii2/base/BaseObject.php:107
#4  /var/www/images/vendor/yiisoft/yii2/base/Application.php:206
#5  yii\base\Application->__construct
#6  /var/www/images/vendor/yiisoft/yii2/di/Container.php:400
#7  /var/www/images/vendor/yiisoft/yii2/di/Container.php:159
#8  /var/www/images/vendor/yiisoft/yii2/BaseYii.php:365
#9  /var/www/images/vendor/symfony/event-dispatcher/EventDispatcher.php:230
#10 /var/www/images/vendor/symfony/event-dispatcher/EventDispatcher.php:59

Swears at any property in the file with parameters /prams.php
What could be the problem?
params.php
<?php
return [
    'adminEmail' => '[email protected]',
    'supportEmail' => '[email protected]',
    'senderEmail' => '[email protected]',
    'senderName' => 'Example.com mailer',
    'user.passwordResetTokenExpire' => 3600,
    'user.passwordMinLength' => 6,
    'user.rememberMeDuration' => 3600 * 24 * 30,
];

codeception-local.php
<?php
return yii\helpers\ArrayHelper::merge(
    require __DIR__ . '/main.php',
    require __DIR__ . '/main-local.php',
    require __DIR__ . '/test.php',
    require __DIR__ . '/test-local.php',
    require __DIR__ . '/params.php',
    [
        'components' => [
            'request' => [
                // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
                'cookieValidationKey' => 'YO6sh7ZcYB5D22U5wpX2Cq2pIwzsP6gy',
            ],
        ],
    ]
);

codeception.yaml
namespace: common\tests
actor_suffix: Tester
paths:
    tests: tests
    output: tests/_output
    data: tests/_data
    support: tests/_support
bootstrap: _bootstrap.php
settings:
    colors: true
    memory_limit: 1024M
modules:
    config:
        Yii2:
            configFile: 'config/codeception-local.php'

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question