Commit af8f0b1a by Qiang Xue

Merge pull request #2478 from Ragazzo/yii2_advanced_tests_fixed

Yii2 advanced tests fixed
parents 557e3430 468f8042
......@@ -61,7 +61,7 @@ class LoginForm extends Model
*
* @return User|null
*/
private function getUser()
public function getUser()
{
if ($this->_user === false) {
$this->_user = User::findByUsername($this->username);
......
<?php
return [
'preload' => [
'debug',
],
'modules' => [
'debug' => 'yii\debug\Module',
'gii' => 'yii\gii\Module',
],
];
$config = [];
if (!YII_ENV_TEST) {
// configuration adjustments for 'dev' environment
$config['preload'][] = 'debug';
$config['modules']['debug'] = 'yii\debug\Module';
$config['modules']['gii'] = 'yii\gii\Module';
}
return $config;
<?php
return [
'preload' => [
'debug',
],
'modules' => [
'debug' => 'yii\debug\Module',
'gii' => 'yii\gii\Module',
],
];
$config = [];
if (!YII_ENV_TEST) {
// configuration adjustments for 'dev' environment
$config['preload'][] = 'debug';
$config['modules']['debug'] = 'yii\debug\Module';
$config['modules']['gii'] = 'yii\gii\Module';
}
return $config;
<?php
namespace frontend\tests\unit;
class TestCase extends \yii\codeception\TestCase
{
public $appConfig = '@frontend/tests/unit/_config.php';
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment