Skip to content

Commit

Permalink
[update] template advanced with yii 2.0.11 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
haqqi committed Feb 2, 2017
1 parent 7a4c3be commit 780e1ff
Show file tree
Hide file tree
Showing 12 changed files with 103 additions and 11 deletions.
5 changes: 5 additions & 0 deletions backend/config/test.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<?php
return [
'id' => 'app-backend-tests',
'components' => [
'assetManager' => [
'basePath' => __DIR__ . '/../web/assets',
],
],
];
15 changes: 15 additions & 0 deletions backend/tests/functional/_bootstrap.php
Original file line number Diff line number Diff line change
@@ -1 +1,16 @@
<?php
/**
* Here you can initialize variables via \Codeception\Util\Fixtures class
* to store data in global array and use it in Cests.
*
* ```php
* // Here _bootstrap.php
* \Codeception\Util\Fixtures::add('user1', ['name' => 'davert']);
* ```
*
* In Cests
*
* ```php
* \Codeception\Util\Fixtures::get('user1');
* ```
*/
16 changes: 15 additions & 1 deletion backend/tests/unit/_bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,2 +1,16 @@
<?php
// Here you can initialize variables that will for your tests
/**
* Here you can initialize variables via \Codeception\Util\Fixtures class
* to store data in global array and use it in Tests.
*
* ```php
* // Here _bootstrap.php
* \Codeception\Util\Fixtures::add('user1', ['name' => 'davert']);
* ```
*
* In Tests
*
* ```php
* \Codeception\Util\Fixtures::get('user1');
* ```
*/
2 changes: 1 addition & 1 deletion common/tests/unit/models/LoginFormTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
class LoginFormTest extends \Codeception\Test\Unit
{
/**
* @var \frontend\tests\UnitTester
* @var \common\tests\UnitTester
*/
protected $tester;

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"require": {
"oomphinc/composer-installers-extender": "*",
"php": ">=5.4.0",
"yiisoft/yii2": "~2.0.10",
"yiisoft/yii2": "~2.0.11",
"yiisoft/yii2-bootstrap": "~2.0.2",
"yiisoft/yii2-swiftmailer": "~2.0.0"
},
Expand Down
18 changes: 12 additions & 6 deletions console/config/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,25 @@
);

return [
'id' => 'app-console',
'basePath' => dirname(__DIR__),
'bootstrap' => ['log'],
'id' => 'app-console',
'basePath' => dirname(__DIR__),
'bootstrap' => ['log'],
'controllerNamespace' => 'console\controllers',
'components' => [
'controllerMap' => [
'fixture' => [
'class' => 'yii\console\controllers\FixtureController',
'namespace' => 'common\fixtures',
],
],
'components' => [
'log' => [
'targets' => [
[
'class' => 'yii\log\FileTarget',
'class' => 'yii\log\FileTarget',
'levels' => ['error', 'warning'],
],
],
],
],
'params' => $params,
'params' => $params,
];
5 changes: 5 additions & 0 deletions frontend/config/test.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<?php
return [
'id' => 'app-frontend-tests',
'components' => [
'assetManager' => [
'basePath' => __DIR__ . '/../web/assets',
],
],
];
3 changes: 3 additions & 0 deletions frontend/tests/acceptance/HomeCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ public function checkHome(AcceptanceTester $I)
{
$I->amOnPage(Url::toRoute('/site/index'));
$I->see('My Company');

$I->seeLink('About');
$I->click('About');
$I->wait(2); // wait for page to be opened

$I->see('This is the About page.');
}
}
15 changes: 15 additions & 0 deletions frontend/tests/acceptance/_bootstrap.php
Original file line number Diff line number Diff line change
@@ -1 +1,16 @@
<?php
/**
* Here you can initialize variables via \Codeception\Util\Fixtures class
* to store data in global array and use it in Cepts.
*
* ```php
* // Here _bootstrap.php
* \Codeception\Util\Fixtures::add('user1', ['name' => 'davert']);
* ```
*
* In Cept
*
* ```php
* \Codeception\Util\Fixtures::get('user1');
* ```
*/
15 changes: 15 additions & 0 deletions frontend/tests/functional/_bootstrap.php
Original file line number Diff line number Diff line change
@@ -1 +1,16 @@
<?php
/**
* Here you can initialize variables via \Codeception\Util\Fixtures class
* to store data in global array and use it in Cests.
*
* ```php
* // Here _bootstrap.php
* \Codeception\Util\Fixtures::add('user1', ['name' => 'davert']);
* ```
*
* In Cests
*
* ```php
* \Codeception\Util\Fixtures::get('user1');
* ```
*/
16 changes: 15 additions & 1 deletion frontend/tests/unit/_bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,2 +1,16 @@
<?php
// Here you can initialize variables that will for your tests
/**
* Here you can initialize variables via \Codeception\Util\Fixtures class
* to store data in global array and use it in Tests.
*
* ```php
* // Here _bootstrap.php
* \Codeception\Util\Fixtures::add('user1', ['name' => 'davert']);
* ```
*
* In Tests
*
* ```php
* \Codeception\Util\Fixtures::get('user1');
* ```
*/
2 changes: 1 addition & 1 deletion requirements.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* In order to run this script from the web, you should copy it to the web root.
* If you are using Linux you can create a hard link instead, using the following command:
* ln requirements.php ../requirements.php
* ln ../requirements.php requirements.php
*/

// you may need to adjust this path to the correct Yii framework path
Expand Down

0 comments on commit 780e1ff

Please sign in to comment.