Login test fails


#1

I’m a little confused by this one. The out of box unit test LoginFormTest fails after updating Yii2. The test that fails is “Login Correct”. This is the error that I get:

[yii\base\InvalidConfigException] yii\web\Request::cookieValidationKey must be configured with a secret key.

Secret is configured in both fronted and backend. Login works just fine on my actual site. Not sure why the test fails now.

Some help would be appreciated.


#2

Solved the problem by adding


'components' => [

        'request' => [

            'cookieValidationKey' => 'XXXXXXXXX',

        ]

to main-local.php under ‘common/config’.


(Jacob Moen) #3

Good thinking :)