@@ -5,7 +5,6 @@ |
||
5 | 5 | use Codeception\Stub; |
6 | 6 | use yii\base\Action; |
7 | 7 | use yii\web\Request; |
8 | -use yii\web\View; |
|
9 | 8 | |
10 | 9 | class SiteControllerTest extends \Codeception\Test\Unit |
11 | 10 | { |
@@ -19,8 +19,8 @@ discard block |
||
19 | 19 | |
20 | 20 | protected function _before() |
21 | 21 | { |
22 | - $_SERVER['REQUEST_URI']='index.php'; |
|
23 | - $config = require( __DIR__ . "/../_config/test.php"); |
|
22 | + $_SERVER['REQUEST_URI'] = 'index.php'; |
|
23 | + $config = require(__DIR__ . "/../_config/test.php"); |
|
24 | 24 | $this->model = new SiteController('site', new \yii\web\Application($config)); |
25 | 25 | \Yii::$app->controller = $this->model; |
26 | 26 | \Yii::$app->controller->action = new Action('fake', $this->model); |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | * @param $data |
57 | 57 | * @return Request |
58 | 58 | */ |
59 | - private function mockRequest($data){ |
|
59 | + private function mockRequest($data) { |
|
60 | 60 | // mock a request |
61 | 61 | $_SERVER['REQUEST_URI'] = 'http://localhost'; |
62 | 62 | $_SERVER['REMOTE_ADDR'] = '127.0.0.1'; |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | |
15 | 15 | ?> |
16 | 16 | <div id="bulk-email-validation"> |
17 | - <?php if($model->module->displayFlashMessages):?> |
|
17 | + <?php if ($model->module->displayFlashMessages):?> |
|
18 | 18 | <div class="row"> |
19 | 19 | <div class="col-xs-12"> |
20 | 20 | <?php foreach (Yii::$app->session->getAllFlashes() as $type => $data): ?> |
@@ -29,13 +29,13 @@ discard block |
||
29 | 29 | <?php endforeach ?> |
30 | 30 | </div> |
31 | 31 | </div> |
32 | - <?php endif;?> |
|
32 | + <?php endif; ?> |
|
33 | 33 | |
34 | 34 | |
35 | 35 | <div class="panel panel-default email-validation-results" id="email-validation-results"> |
36 | 36 | <div class="panel-heading"> |
37 | - <?= Yii::t('app','Input')?> |
|
38 | - <a class="pull-right btn btn-default btn-xs" data-toggle="collapse" href="#emails-validation-input"><?=Yii::t('app','Show/hide')?></a> |
|
37 | + <?= Yii::t('app', 'Input')?> |
|
38 | + <a class="pull-right btn btn-default btn-xs" data-toggle="collapse" href="#emails-validation-input"><?=Yii::t('app', 'Show/hide')?></a> |
|
39 | 39 | </div> |
40 | 40 | |
41 | 41 | <div id="emails-validation-input" class="panel-collapse collapse <?=(count($model->emailAddresses)>0 ? null:'in')?>"> |
@@ -66,5 +66,5 @@ discard block |
||
66 | 66 | |
67 | 67 | <?php $form = ActiveForm::end() ?> |
68 | 68 | |
69 | - <?= $this->render('_validation-list',['model'=>$model,'dataProvider'=>$dataProvider])?> |
|
69 | + <?= $this->render('_validation-list', ['model'=>$model, 'dataProvider'=>$dataProvider])?> |
|
70 | 70 | </div> |
71 | 71 | \ No newline at end of file |
@@ -3,7 +3,7 @@ |
||
3 | 3 | |
4 | 4 | $config = [ |
5 | 5 | 'id' => 'test-app', |
6 | - 'basePath' => dirname(__DIR__). "/../src/", |
|
6 | + 'basePath' => dirname(__DIR__) . "/../src/", |
|
7 | 7 | 'aliases' =>[ |
8 | 8 | |
9 | 9 | '@vendor' => '@app/../vendor', |