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 ...@@ -61,7 +61,7 @@ class LoginForm extends Model
* *
* @return User|null * @return User|null
*/ */
private function getUser() public function getUser()
{ {
if ($this->_user === false) { if ($this->_user === false) {
$this->_user = User::findByUsername($this->username); $this->_user = User::findByUsername($this->username);
......
<?php <?php
return [
'preload' => [ $config = [];
'debug',
], if (!YII_ENV_TEST) {
'modules' => [ // configuration adjustments for 'dev' environment
'debug' => 'yii\debug\Module', $config['preload'][] = 'debug';
'gii' => 'yii\gii\Module', $config['modules']['debug'] = 'yii\debug\Module';
], $config['modules']['gii'] = 'yii\gii\Module';
]; }
return $config;
<?php <?php
return [
'preload' => [ $config = [];
'debug',
], if (!YII_ENV_TEST) {
'modules' => [ // configuration adjustments for 'dev' environment
'debug' => 'yii\debug\Module', $config['preload'][] = 'debug';
'gii' => 'yii\gii\Module', $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