Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
c33214b3
Commit
c33214b3
authored
Aug 17, 2014
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjusted test configs structure
parent
28091ed2
Show whitespace changes
Inline
Side-by-side
Showing
47 changed files
with
104 additions
and
140 deletions
+104
-140
_bootstrap.php
...anced/tests/codeception/backend/acceptance/_bootstrap.php
+1
-2
functional.suite.yml
apps/advanced/tests/codeception/backend/functional.suite.yml
+1
-1
_bootstrap.php
...anced/tests/codeception/backend/functional/_bootstrap.php
+1
-2
DbTestCase.php
apps/advanced/tests/codeception/backend/unit/DbTestCase.php
+1
-1
TestCase.php
apps/advanced/tests/codeception/backend/unit/TestCase.php
+1
-1
_bootstrap.php
apps/advanced/tests/codeception/bin/_bootstrap.php
+0
-0
yii_acceptance
apps/advanced/tests/codeception/bin/yii_acceptance
+2
-6
yii_functional
apps/advanced/tests/codeception/bin/yii_functional
+2
-6
yii_unit
apps/advanced/tests/codeception/bin/yii_unit
+2
-6
DbTestCase.php
apps/advanced/tests/codeception/common/unit/DbTestCase.php
+1
-1
TestCase.php
apps/advanced/tests/codeception/common/unit/TestCase.php
+1
-1
acceptance.php
apps/advanced/tests/codeception/config/acceptance.php
+4
-6
acceptance.php
.../advanced/tests/codeception/config/backend/acceptance.php
+5
-8
config.php
apps/advanced/tests/codeception/config/backend/config.php
+3
-0
functional.php
.../advanced/tests/codeception/config/backend/functional.php
+3
-6
unit.php
apps/advanced/tests/codeception/config/backend/unit.php
+3
-6
unit.php
apps/advanced/tests/codeception/config/common/unit.php
+5
-7
config.php
apps/advanced/tests/codeception/config/config.php
+1
-1
unit.php
apps/advanced/tests/codeception/config/console/unit.php
+12
-0
acceptance.php
...advanced/tests/codeception/config/frontend/acceptance.php
+5
-8
config.php
apps/advanced/tests/codeception/config/frontend/config.php
+3
-0
functional.php
...advanced/tests/codeception/config/frontend/functional.php
+5
-8
unit.php
apps/advanced/tests/codeception/config/frontend/unit.php
+3
-6
functional.php
apps/advanced/tests/codeception/config/functional.php
+4
-6
unit.php
apps/advanced/tests/codeception/config/unit.php
+4
-6
DbTestCase.php
apps/advanced/tests/codeception/console/unit/DbTestCase.php
+1
-1
TestCase.php
apps/advanced/tests/codeception/console/unit/TestCase.php
+1
-1
_config.php
apps/advanced/tests/codeception/console/unit/_config.php
+0
-16
_bootstrap.php
...nced/tests/codeception/frontend/acceptance/_bootstrap.php
+1
-2
functional.suite.yml
.../advanced/tests/codeception/frontend/functional.suite.yml
+1
-1
_bootstrap.php
...nced/tests/codeception/frontend/functional/_bootstrap.php
+1
-1
DbTestCase.php
apps/advanced/tests/codeception/frontend/unit/DbTestCase.php
+1
-1
TestCase.php
apps/advanced/tests/codeception/frontend/unit/TestCase.php
+1
-1
ContactCept.php
apps/basic/tests/codeception/acceptance/ContactCept.php
+0
-0
_bootstrap.php
apps/basic/tests/codeception/acceptance/_bootstrap.php
+1
-2
_bootstrap.php
apps/basic/tests/codeception/bin/_bootstrap.php
+0
-2
yii_acceptance
apps/basic/tests/codeception/bin/yii_acceptance
+2
-2
yii_functional
apps/basic/tests/codeception/bin/yii_functional
+2
-2
yii_unit
apps/basic/tests/codeception/bin/yii_unit
+2
-2
acceptance.php
apps/basic/tests/codeception/config/acceptance.php
+4
-2
config.php
apps/basic/tests/codeception/config/config.php
+1
-1
functional.php
apps/basic/tests/codeception/config/functional.php
+4
-1
unit.php
apps/basic/tests/codeception/config/unit.php
+4
-2
functional.suite.yml
apps/basic/tests/codeception/functional.suite.yml
+1
-1
_bootstrap.php
apps/basic/tests/codeception/functional/_bootstrap.php
+1
-2
index-test.php
apps/basic/web/index-test.php
+1
-1
TestCase.php
extensions/codeception/TestCase.php
+1
-1
No files found.
apps/advanced/tests/codeception/backend/acceptance/_bootstrap.php
View file @
c33214b3
<?php
<?php
new
yii\web\Application
(
require
(
dirname
(
dirname
(
__DIR__
))
.
'/config/backend/acceptance.php'
));
new
yii\web\Application
(
require
(
__DIR__
.
'/_config.php'
));
apps/advanced/tests/codeception/backend/functional.suite.yml
View file @
c33214b3
...
@@ -14,4 +14,4 @@ modules:
...
@@ -14,4 +14,4 @@ modules:
-
codeception\common\_support\FixtureHelper
-
codeception\common\_support\FixtureHelper
config
:
config
:
Yii2
:
Yii2
:
configFile
:
'
functional/_config
.php'
configFile
:
'
../config/backend/functional
.php'
apps/advanced/tests/codeception/backend/functional/_bootstrap.php
View file @
c33214b3
<?php
<?php
new
yii\web\Application
(
require
(
dirname
(
dirname
(
__DIR__
))
.
'/config/backend/functional.php'
));
new
yii\web\Application
(
require
(
__DIR__
.
'/_config.php'
));
apps/advanced/tests/codeception/backend/unit/DbTestCase.php
View file @
c33214b3
...
@@ -4,5 +4,5 @@ namespace backend\tests\unit;
...
@@ -4,5 +4,5 @@ namespace backend\tests\unit;
class
DbTestCase
extends
\yii\codeception\DbTestCase
class
DbTestCase
extends
\yii\codeception\DbTestCase
{
{
public
$appConfig
=
'@
backend/tests/unit/_config
.php'
;
public
$appConfig
=
'@
codeception/config/backend/unit
.php'
;
}
}
apps/advanced/tests/codeception/backend/unit/TestCase.php
View file @
c33214b3
...
@@ -4,5 +4,5 @@ namespace backend\tests\unit;
...
@@ -4,5 +4,5 @@ namespace backend\tests\unit;
class
TestCase
extends
\yii\codeception\TestCase
class
TestCase
extends
\yii\codeception\TestCase
{
{
public
$appConfig
=
'@
backend/tests/unit/_config
.php'
;
public
$appConfig
=
'@
codeception/config/backend/unit
.php'
;
}
}
apps/advanced/tests/codeception/bin/_
console_
bootstrap.php
→
apps/advanced/tests/codeception/bin/_bootstrap.php
View file @
c33214b3
File moved
apps/advanced/tests/codeception/bin/yii_acceptance
View file @
c33214b3
...
@@ -8,19 +8,15 @@
...
@@ -8,19 +8,15 @@
* @license http://www.yiiframework.com/license/
* @license http://www.yiiframework.com/license/
*/
*/
require_once
__DIR__
.
'/_
console_
bootstrap.php'
;
require_once
__DIR__
.
'/_bootstrap.php'
;
$config
=
yii\helpers\ArrayHelper
::
merge
(
$config
=
yii\helpers\ArrayHelper
::
merge
(
require
(
ROOT_DIR
.
'/common/config/main.php'
),
require
(
ROOT_DIR
.
'/common/config/main.php'
),
require
(
ROOT_DIR
.
'/common/config/main-local.php'
),
require
(
ROOT_DIR
.
'/common/config/main-local.php'
),
require
(
ROOT_DIR
.
'/console/config/main.php'
),
require
(
ROOT_DIR
.
'/console/config/main.php'
),
require
(
ROOT_DIR
.
'/console/config/main-local.php'
),
require
(
ROOT_DIR
.
'/console/config/main-local.php'
),
require
(
dirname
(
__DIR__
)
.
'/config/acceptance.php'
),
[
[
'components'
=>
[
'db'
=>
[
'dsn'
=>
'mysql:host=localhost;dbname=yii2_advanced_acceptance'
,
],
],
'controllerMap'
=>
[
'controllerMap'
=>
[
'fixture'
=>
[
'fixture'
=>
[
'class'
=>
'yii\faker\FixtureController'
,
'class'
=>
'yii\faker\FixtureController'
,
...
...
apps/advanced/tests/codeception/bin/yii_functional
View file @
c33214b3
...
@@ -8,19 +8,15 @@
...
@@ -8,19 +8,15 @@
* @license http://www.yiiframework.com/license/
* @license http://www.yiiframework.com/license/
*/
*/
require_once
__DIR__
.
'/_
console_
bootstrap.php'
;
require_once
__DIR__
.
'/_bootstrap.php'
;
$config
=
yii\helpers\ArrayHelper
::
merge
(
$config
=
yii\helpers\ArrayHelper
::
merge
(
require
(
ROOT_DIR
.
'/common/config/main.php'
),
require
(
ROOT_DIR
.
'/common/config/main.php'
),
require
(
ROOT_DIR
.
'/common/config/main-local.php'
),
require
(
ROOT_DIR
.
'/common/config/main-local.php'
),
require
(
ROOT_DIR
.
'/console/config/main.php'
),
require
(
ROOT_DIR
.
'/console/config/main.php'
),
require
(
ROOT_DIR
.
'/console/config/main-local.php'
),
require
(
ROOT_DIR
.
'/console/config/main-local.php'
),
require
(
dirname
(
__DIR__
)
.
'/config/functional.php'
),
[
[
'components'
=>
[
'db'
=>
[
'dsn'
=>
'mysql:host=localhost;dbname=yii2_advanced_functional'
,
],
],
'controllerMap'
=>
[
'controllerMap'
=>
[
'fixture'
=>
[
'fixture'
=>
[
'class'
=>
'yii\faker\FixtureController'
,
'class'
=>
'yii\faker\FixtureController'
,
...
...
apps/advanced/tests/codeception/bin/yii_unit
View file @
c33214b3
...
@@ -8,19 +8,15 @@
...
@@ -8,19 +8,15 @@
* @license http://www.yiiframework.com/license/
* @license http://www.yiiframework.com/license/
*/
*/
require_once
__DIR__
.
'/_
console_
bootstrap.php'
;
require_once
__DIR__
.
'/_bootstrap.php'
;
$config
=
yii\helpers\ArrayHelper
::
merge
(
$config
=
yii\helpers\ArrayHelper
::
merge
(
require
(
ROOT_DIR
.
'/common/config/main.php'
),
require
(
ROOT_DIR
.
'/common/config/main.php'
),
require
(
ROOT_DIR
.
'/common/config/main-local.php'
),
require
(
ROOT_DIR
.
'/common/config/main-local.php'
),
require
(
ROOT_DIR
.
'/console/config/main.php'
),
require
(
ROOT_DIR
.
'/console/config/main.php'
),
require
(
ROOT_DIR
.
'/console/config/main-local.php'
),
require
(
ROOT_DIR
.
'/console/config/main-local.php'
),
require
(
dirname
(
__DIR__
)
.
'/config/unit.php'
),
[
[
'components'
=>
[
'db'
=>
[
'dsn'
=>
'mysql:host=localhost;dbname=yii2_advanced_unit'
,
],
],
'controllerMap'
=>
[
'controllerMap'
=>
[
'fixture'
=>
[
'fixture'
=>
[
'class'
=>
'yii\faker\FixtureController'
,
'class'
=>
'yii\faker\FixtureController'
,
...
...
apps/advanced/tests/codeception/common/unit/DbTestCase.php
View file @
c33214b3
...
@@ -7,5 +7,5 @@ namespace codeception\common\unit;
...
@@ -7,5 +7,5 @@ namespace codeception\common\unit;
*/
*/
class
DbTestCase
extends
\yii\codeception\DbTestCase
class
DbTestCase
extends
\yii\codeception\DbTestCase
{
{
public
$appConfig
=
'@codeception/co
mmon/unit/_config
.php'
;
public
$appConfig
=
'@codeception/co
nfig/common/unit
.php'
;
}
}
apps/advanced/tests/codeception/common/unit/TestCase.php
View file @
c33214b3
...
@@ -7,5 +7,5 @@ namespace common\tests\unit;
...
@@ -7,5 +7,5 @@ namespace common\tests\unit;
*/
*/
class
TestCase
extends
\yii\codeception\TestCase
class
TestCase
extends
\yii\codeception\TestCase
{
{
public
$appConfig
=
'@co
mmon/tests/unit/_config
.php'
;
public
$appConfig
=
'@co
deception/config/common/unit
.php'
;
}
}
apps/advanced/tests/codeception/
frontend/_config
.php
→
apps/advanced/tests/codeception/
config/acceptance
.php
View file @
c33214b3
<?php
<?php
/**
/**
*
application configurations shared by all test type
s
*
Application configuration shared by all applications acceptance test
s
*/
*/
return
[
return
[
'components'
=>
[
'components'
=>
[
'mailer'
=>
[
'db'
=>
[
'useFileTransport'
=>
true
,
'dsn'
=>
'mysql:host=localhost;dbname=yii2_advanced_acceptance'
,
],
'urlManager'
=>
[
'showScriptName'
=>
true
,
],
],
],
],
];
];
\ No newline at end of file
apps/advanced/tests/codeception/
backend/acceptance/_config
.php
→
apps/advanced/tests/codeception/
config/backend/acceptance
.php
View file @
c33214b3
<?php
<?php
defined
(
'ROOT_DIR'
)
or
define
(
'ROOT_DIR'
,
dirname
(
dirname
(
dirname
(
dirname
(
__DIR__
)))));
defined
(
'ROOT_DIR'
)
or
define
(
'ROOT_DIR'
,
dirname
(
dirname
(
dirname
(
dirname
(
__DIR__
)))));
return
yii\helpers\ArrayHelper
::
merge
(
return
yii\helpers\ArrayHelper
::
merge
(
require
(
ROOT_DIR
.
'/backend/config/main.php'
),
require
(
ROOT_DIR
.
'/backend/config/main-local.php'
),
require
(
ROOT_DIR
.
'/common/config/main.php'
),
require
(
ROOT_DIR
.
'/common/config/main.php'
),
require
(
ROOT_DIR
.
'/common/config/main-local.php'
),
require
(
ROOT_DIR
.
'/common/config/main-local.php'
),
require
(
__DIR__
.
'/../_config.php'
),
require
(
ROOT_DIR
.
'/backend/config/main.php'
),
require
(
ROOT_DIR
.
'/backend/config/main-local.php'
),
require
(
dirname
(
__DIR__
)
.
'/config.php'
),
require
(
dirname
(
__DIR__
)
.
'/acceptance.php'
),
require
(
__DIR__
.
'/config.php'
),
[
[
'components'
=>
[
'db'
=>
[
'dsn'
=>
'mysql:host=localhost;dbname=yii2_advanced_acceptance'
,
],
],
]
]
);
);
apps/advanced/tests/codeception/config/backend/config.php
0 → 100644
View file @
c33214b3
<?php
return
[];
\ No newline at end of file
apps/advanced/tests/codeception/
backend/functional/_config
.php
→
apps/advanced/tests/codeception/
config/backend/functional
.php
View file @
c33214b3
...
@@ -7,12 +7,9 @@ return yii\helpers\ArrayHelper::merge(
...
@@ -7,12 +7,9 @@ return yii\helpers\ArrayHelper::merge(
require
(
ROOT_DIR
.
'/backend/config/main-local.php'
),
require
(
ROOT_DIR
.
'/backend/config/main-local.php'
),
require
(
ROOT_DIR
.
'/common/config/main.php'
),
require
(
ROOT_DIR
.
'/common/config/main.php'
),
require
(
ROOT_DIR
.
'/common/config/main-local.php'
),
require
(
ROOT_DIR
.
'/common/config/main-local.php'
),
require
(
__DIR__
.
'/../_config.php'
),
require
(
dirname
(
__DIR__
)
.
'/config.php'
),
require
(
dirname
(
__DIR__
)
.
'/functional.php'
),
require
(
__DIR__
.
'/config.php'
),
[
[
'components'
=>
[
'db'
=>
[
'dsn'
=>
'mysql:host=localhost;dbname=yii2_advanced_functional'
,
],
],
]
]
);
);
apps/advanced/tests/codeception/
backend/unit/_config
.php
→
apps/advanced/tests/codeception/
config/backend/unit
.php
View file @
c33214b3
...
@@ -5,12 +5,9 @@ return yii\helpers\ArrayHelper::merge(
...
@@ -5,12 +5,9 @@ return yii\helpers\ArrayHelper::merge(
require
(
ROOT_DIR
.
'/common/config/main-local.php'
),
require
(
ROOT_DIR
.
'/common/config/main-local.php'
),
require
(
ROOT_DIR
.
'/backend/config/main.php'
),
require
(
ROOT_DIR
.
'/backend/config/main.php'
),
require
(
ROOT_DIR
.
'/backend/config/main-local.php'
),
require
(
ROOT_DIR
.
'/backend/config/main-local.php'
),
require
(
dirname
(
__DIR__
)
.
'/_config.php'
),
require
(
dirname
(
__DIR__
)
.
'/config.php'
),
require
(
dirname
(
__DIR__
)
.
'/unit.php'
),
require
(
__DIR__
.
'/config.php'
),
[
[
'components'
=>
[
'db'
=>
[
'dsn'
=>
'mysql:host=localhost;dbname=yii2_advanced_unit'
,
],
],
]
]
);
);
apps/advanced/tests/codeception/co
mmon/unit/_config
.php
→
apps/advanced/tests/codeception/co
nfig/common/unit
.php
View file @
c33214b3
<?php
<?php
/**
* Application config for common unit tests
*/
return
yii\helpers\ArrayHelper
::
merge
(
return
yii\helpers\ArrayHelper
::
merge
(
require
(
ROOT_DIR
.
'/common/config/main.php'
),
require
(
ROOT_DIR
.
'/common/config/main.php'
),
require
(
ROOT_DIR
.
'/common/config/main-local.php'
),
require
(
ROOT_DIR
.
'/common/config/main-local.php'
),
require
(
__DIR__
.
'/../_config.php'
),
require
(
dirname
(
__DIR__
)
.
'/config.php'
),
require
(
dirname
(
__DIR__
)
.
'/unit.php'
),
[
[
'components'
=>
[
'db'
=>
[
'dsn'
=>
'mysql:host=localhost;dbname=yii2_advanced_unit'
,
],
],
'id'
=>
'app-common'
,
'id'
=>
'app-common'
,
'basePath'
=>
dirname
(
__DIR__
),
'basePath'
=>
dirname
(
__DIR__
),
]
]
...
...
apps/advanced/tests/codeception/
backend/_
config.php
→
apps/advanced/tests/codeception/
config/
config.php
View file @
c33214b3
<?php
<?php
/**
/**
*
application configurations shared by all
test types
*
Application configuration shared by all applications and
test types
*/
*/
return
[
return
[
'components'
=>
[
'components'
=>
[
...
...
apps/advanced/tests/codeception/config/console/unit.php
0 → 100644
View file @
c33214b3
<?php
return
yii\helpers\ArrayHelper
::
merge
(
require
(
ROOT_DIR
.
'/common/config/main.php'
),
require
(
ROOT_DIR
.
'/common/config/main-local.php'
),
require
(
ROOT_DIR
.
'/console/config/main.php'
),
require
(
ROOT_DIR
.
'/console/config/main-local.php'
),
require
(
dirname
(
__DIR__
)
.
'/config.php'
),
require
(
dirname
(
__DIR__
)
.
'/unit.php'
),
[
]
);
apps/advanced/tests/codeception/
frontend/acceptance/_config
.php
→
apps/advanced/tests/codeception/
config/frontend/acceptance
.php
View file @
c33214b3
<?php
<?php
defined
(
'ROOT_DIR'
)
or
define
(
'ROOT_DIR'
,
dirname
(
dirname
(
dirname
(
dirname
(
__DIR__
)))));
defined
(
'ROOT_DIR'
)
or
define
(
'ROOT_DIR'
,
dirname
(
dirname
(
dirname
(
dirname
(
__DIR__
)))));
return
yii\helpers\ArrayHelper
::
merge
(
return
yii\helpers\ArrayHelper
::
merge
(
require
(
ROOT_DIR
.
'/frontend/config/main.php'
),
require
(
ROOT_DIR
.
'/frontend/config/main-local.php'
),
require
(
ROOT_DIR
.
'/common/config/main.php'
),
require
(
ROOT_DIR
.
'/common/config/main.php'
),
require
(
ROOT_DIR
.
'/common/config/main-local.php'
),
require
(
ROOT_DIR
.
'/common/config/main-local.php'
),
require
(
__DIR__
.
'/../_config.php'
),
require
(
ROOT_DIR
.
'/frontend/config/main.php'
),
require
(
ROOT_DIR
.
'/frontend/config/main-local.php'
),
require
(
dirname
(
__DIR__
)
.
'/config.php'
),
require
(
dirname
(
__DIR__
)
.
'/acceptance.php'
),
require
(
__DIR__
.
'/config.php'
),
[
[
'components'
=>
[
'db'
=>
[
'dsn'
=>
'mysql:host=localhost;dbname=yii2_advanced_acceptance'
,
],
],
]
]
);
);
apps/advanced/tests/codeception/config/frontend/config.php
0 → 100644
View file @
c33214b3
<?php
return
[];
\ No newline at end of file
apps/advanced/tests/codeception/
frontend/functional/_config
.php
→
apps/advanced/tests/codeception/
config/frontend/functional
.php
View file @
c33214b3
...
@@ -3,16 +3,13 @@ $_SERVER['SCRIPT_FILENAME'] = FRONTEND_ENTRY_FILE;
...
@@ -3,16 +3,13 @@ $_SERVER['SCRIPT_FILENAME'] = FRONTEND_ENTRY_FILE;
$_SERVER
[
'SCRIPT_NAME'
]
=
FRONTEND_ENTRY_URL
;
$_SERVER
[
'SCRIPT_NAME'
]
=
FRONTEND_ENTRY_URL
;
return
yii\helpers\ArrayHelper
::
merge
(
return
yii\helpers\ArrayHelper
::
merge
(
require
(
ROOT_DIR
.
'/frontend/config/main.php'
),
require
(
ROOT_DIR
.
'/frontend/config/main-local.php'
),
require
(
ROOT_DIR
.
'/common/config/main.php'
),
require
(
ROOT_DIR
.
'/common/config/main.php'
),
require
(
ROOT_DIR
.
'/common/config/main-local.php'
),
require
(
ROOT_DIR
.
'/common/config/main-local.php'
),
require
(
__DIR__
.
'/../_config.php'
),
require
(
ROOT_DIR
.
'/frontend/config/main.php'
),
require
(
ROOT_DIR
.
'/frontend/config/main-local.php'
),
require
(
dirname
(
__DIR__
)
.
'/config.php'
),
require
(
dirname
(
__DIR__
)
.
'/functional.php'
),
require
(
__DIR__
.
'/config.php'
),
[
[
'components'
=>
[
'db'
=>
[
'dsn'
=>
'mysql:host=localhost;dbname=yii2_advanced_functional'
,
],
],
]
]
);
);
apps/advanced/tests/codeception/
frontend/unit/_config
.php
→
apps/advanced/tests/codeception/
config/frontend/unit
.php
View file @
c33214b3
...
@@ -5,12 +5,9 @@ return yii\helpers\ArrayHelper::merge(
...
@@ -5,12 +5,9 @@ return yii\helpers\ArrayHelper::merge(
require
(
ROOT_DIR
.
'/common/config/main-local.php'
),
require
(
ROOT_DIR
.
'/common/config/main-local.php'
),
require
(
ROOT_DIR
.
'/frontend/config/main.php'
),
require
(
ROOT_DIR
.
'/frontend/config/main.php'
),
require
(
ROOT_DIR
.
'/frontend/config/main-local.php'
),
require
(
ROOT_DIR
.
'/frontend/config/main-local.php'
),
require
(
__DIR__
.
'/../_config.php'
),
require
(
dirname
(
__DIR__
)
.
'/config.php'
),
require
(
dirname
(
__DIR__
)
.
'/unit.php'
),
require
(
__DIR__
.
'/config.php'
),
[
[
'components'
=>
[
'db'
=>
[
'dsn'
=>
'mysql:host=localhost;dbname=yii2_advanced_unit'
,
],
],
]
]
);
);
apps/
basic/tests/codeception/_config
.php
→
apps/
advanced/tests/codeception/config/functional
.php
View file @
c33214b3
<?php
<?php
/**
/**
*
application configurations shared by all test type
s
*
Application configuration shared by all applications functional test
s
*/
*/
return
[
return
[
'components'
=>
[
'components'
=>
[
'mailer'
=>
[
'db'
=>
[
'useFileTransport'
=>
true
,
'dsn'
=>
'mysql:host=localhost;dbname=yii2_advanced_acceptance'
,
],
'urlManager'
=>
[
'showScriptName'
=>
true
,
],
],
],
],
];
];
\ No newline at end of file
apps/advanced/tests/codeception/con
sole/_config
.php
→
apps/advanced/tests/codeception/con
fig/unit
.php
View file @
c33214b3
<?php
<?php
/**
/**
*
application configurations shared by all test type
s
*
Application configuration shared by all applications unit test
s
*/
*/
return
[
return
[
'components'
=>
[
'components'
=>
[
'mailer'
=>
[
'db'
=>
[
'useFileTransport'
=>
true
,
'dsn'
=>
'mysql:host=localhost;dbname=yii2_advanced_unit'
,
],
'urlManager'
=>
[
'showScriptName'
=>
true
,
],
],
],
],
];
];
\ No newline at end of file
apps/advanced/tests/codeception/console/unit/DbTestCase.php
View file @
c33214b3
...
@@ -7,5 +7,5 @@ namespace console\tests\unit;
...
@@ -7,5 +7,5 @@ namespace console\tests\unit;
*/
*/
class
DbTestCase
extends
\yii\codeception\DbTestCase
class
DbTestCase
extends
\yii\codeception\DbTestCase
{
{
public
$appConfig
=
'@co
nsole/tests/unit/_
config.php'
;
public
$appConfig
=
'@co
deception/config/console/
config.php'
;
}
}
apps/advanced/tests/codeception/console/unit/TestCase.php
View file @
c33214b3
...
@@ -7,5 +7,5 @@ namespace console\tests\unit;
...
@@ -7,5 +7,5 @@ namespace console\tests\unit;
*/
*/
class
TestCase
extends
\yii\codeception\TestCase
class
TestCase
extends
\yii\codeception\TestCase
{
{
public
$appConfig
=
'@co
nsole/tests/unit/_
config.php'
;
public
$appConfig
=
'@co
deception/config/console/
config.php'
;
}
}
apps/advanced/tests/codeception/console/unit/_config.php
deleted
100644 → 0
View file @
28091ed2
<?php
return
yii\helpers\ArrayHelper
::
merge
(
require
(
__DIR__
.
'/../../../common/config/main.php'
),
require
(
__DIR__
.
'/../../../common/config/main-local.php'
),
require
(
__DIR__
.
'/../../config/main.php'
),
require
(
__DIR__
.
'/../../config/main-local.php'
),
require
(
__DIR__
.
'/../_config.php'
),
[
'components'
=>
[
'db'
=>
[
'dsn'
=>
'mysql:host=localhost;dbname=yii2_advanced_unit'
,
],
],
]
);
apps/advanced/tests/codeception/frontend/acceptance/_bootstrap.php
View file @
c33214b3
<?php
<?php
new
yii\web\Application
(
require
(
dirname
(
dirname
(
__DIR__
))
.
'/config/frontend/acceptance.php'
));
new
yii\web\Application
(
require
(
__DIR__
.
'/_config.php'
));
apps/advanced/tests/codeception/frontend/functional.suite.yml
View file @
c33214b3
...
@@ -14,4 +14,4 @@ modules:
...
@@ -14,4 +14,4 @@ modules:
-
codeception\common\_support\FixtureHelper
-
codeception\common\_support\FixtureHelper
config
:
config
:
Yii2
:
Yii2
:
configFile
:
'
functional/_config
.php'
configFile
:
'
../config/frontend/functional
.php'
apps/advanced/tests/codeception/frontend/functional/_bootstrap.php
View file @
c33214b3
<?php
<?php
new
yii\web\Application
(
require
(
__DIR__
.
'/_config
.php'
));
new
yii\web\Application
(
require
(
dirname
(
dirname
(
__DIR__
))
.
'/config/frontend/functional
.php'
));
apps/advanced/tests/codeception/frontend/unit/DbTestCase.php
View file @
c33214b3
...
@@ -7,5 +7,5 @@ namespace codeception\frontend\unit;
...
@@ -7,5 +7,5 @@ namespace codeception\frontend\unit;
*/
*/
class
DbTestCase
extends
\yii\codeception\DbTestCase
class
DbTestCase
extends
\yii\codeception\DbTestCase
{
{
public
$appConfig
=
'@codeception/
frontend/unit/_config
.php'
;
public
$appConfig
=
'@codeception/
config/frontend/unit
.php'
;
}
}
apps/advanced/tests/codeception/frontend/unit/TestCase.php
View file @
c33214b3
...
@@ -7,5 +7,5 @@ namespace codeception\frontend\unit;
...
@@ -7,5 +7,5 @@ namespace codeception\frontend\unit;
*/
*/
class
TestCase
extends
\yii\codeception\TestCase
class
TestCase
extends
\yii\codeception\TestCase
{
{
public
$appConfig
=
'@codeception/
frontend/unit/_config
.php'
;
public
$appConfig
=
'@codeception/
config/frontend/unit
.php'
;
}
}
apps/basic/tests/codeception/acceptance/ContactCept.php
View file @
c33214b3
apps/basic/tests/codeception/acceptance/_bootstrap.php
View file @
c33214b3
<?php
<?php
new
yii\web\Application
(
require
(
dirname
(
__DIR__
)
.
'/config/acceptance.php'
));
new
yii\web\Application
(
require
(
__DIR__
.
'/_config.php'
));
apps/basic/tests/codeception/bin/_
console_
bootstrap.php
→
apps/basic/tests/codeception/bin/_bootstrap.php
View file @
c33214b3
<?php
<?php
defined
(
'YII_DEBUG'
)
or
define
(
'YII_DEBUG'
,
true
);
defined
(
'YII_DEBUG'
)
or
define
(
'YII_DEBUG'
,
true
);
defined
(
'YII_ENV'
)
or
define
(
'YII_ENV'
,
'test'
);
defined
(
'YII_ENV'
)
or
define
(
'YII_ENV'
,
'test'
);
// fcgi doesn't have STDIN and STDOUT defined by default
// fcgi doesn't have STDIN and STDOUT defined by default
...
...
apps/basic/tests/codeception/bin/yii_acceptance
View file @
c33214b3
...
@@ -8,11 +8,11 @@
...
@@ -8,11 +8,11 @@
* @license http://www.yiiframework.com/license/
* @license http://www.yiiframework.com/license/
*/
*/
require_once
__DIR__
.
'/_
console_
bootstrap.php'
;
require_once
__DIR__
.
'/_bootstrap.php'
;
$config
=
yii\helpers\ArrayHelper
::
merge
(
$config
=
yii\helpers\ArrayHelper
::
merge
(
require
(
ROOT_DIR
.
'/config/console.php'
),
require
(
ROOT_DIR
.
'/config/console.php'
),
require
(
__DIR__
.
'/../
_
config.php'
),
require
(
__DIR__
.
'/../
config/
config.php'
),
[
[
'components'
=>
[
'components'
=>
[
'db'
=>
[
'db'
=>
[
...
...
apps/basic/tests/codeception/bin/yii_functional
View file @
c33214b3
...
@@ -8,11 +8,11 @@
...
@@ -8,11 +8,11 @@
* @license http://www.yiiframework.com/license/
* @license http://www.yiiframework.com/license/
*/
*/
require_once
__DIR__
.
'/_
console_
bootstrap.php'
;
require_once
__DIR__
.
'/_bootstrap.php'
;
$config
=
yii\helpers\ArrayHelper
::
merge
(
$config
=
yii\helpers\ArrayHelper
::
merge
(
require
(
ROOT_DIR
.
'/config/console.php'
),
require
(
ROOT_DIR
.
'/config/console.php'
),
require
(
__DIR__
.
'/../
_
config.php'
),
require
(
__DIR__
.
'/../
config/
config.php'
),
[
[
'components'
=>
[
'components'
=>
[
'db'
=>
[
'db'
=>
[
...
...
apps/basic/tests/codeception/bin/yii_unit
View file @
c33214b3
...
@@ -8,11 +8,11 @@
...
@@ -8,11 +8,11 @@
* @license http://www.yiiframework.com/license/
* @license http://www.yiiframework.com/license/
*/
*/
require_once
__DIR__
.
'/_
console_
bootstrap.php'
;
require_once
__DIR__
.
'/_bootstrap.php'
;
$config
=
yii\helpers\ArrayHelper
::
merge
(
$config
=
yii\helpers\ArrayHelper
::
merge
(
require
(
ROOT_DIR
.
'/config/console.php'
),
require
(
ROOT_DIR
.
'/config/console.php'
),
require
(
__DIR__
.
'/../
_
config.php'
),
require
(
__DIR__
.
'/../
config/
config.php'
),
[
[
'components'
=>
[
'components'
=>
[
'db'
=>
[
'db'
=>
[
...
...
apps/basic/tests/codeception/
acceptance/_config
.php
→
apps/basic/tests/codeception/
config/acceptance
.php
View file @
c33214b3
<?php
<?php
/**
* Application configuration for acceptance tests
*/
return
yii\helpers\ArrayHelper
::
merge
(
return
yii\helpers\ArrayHelper
::
merge
(
require
(
__DIR__
.
'/../../../config/web.php'
),
require
(
__DIR__
.
'/../../../config/web.php'
),
require
(
__DIR__
.
'/
../_
config.php'
),
require
(
__DIR__
.
'/config.php'
),
[
[
'components'
=>
[
'components'
=>
[
'db'
=>
[
'db'
=>
[
...
...
apps/
advanced/tests/codeception/common/_
config.php
→
apps/
basic/tests/codeception/config/
config.php
View file @
c33214b3
<?php
<?php
/**
/**
*
application configurations
shared by all test types
*
Application configuration
shared by all test types
*/
*/
return
[
return
[
'components'
=>
[
'components'
=>
[
...
...
apps/basic/tests/codeception/
functional/_config
.php
→
apps/basic/tests/codeception/
config/functional
.php
View file @
c33214b3
...
@@ -2,9 +2,12 @@
...
@@ -2,9 +2,12 @@
$_SERVER
[
'SCRIPT_FILENAME'
]
=
TEST_ENTRY_FILE
;
$_SERVER
[
'SCRIPT_FILENAME'
]
=
TEST_ENTRY_FILE
;
$_SERVER
[
'SCRIPT_NAME'
]
=
TEST_ENTRY_URL
;
$_SERVER
[
'SCRIPT_NAME'
]
=
TEST_ENTRY_URL
;
/**
* Application configuration for functional tests
*/
return
yii\helpers\ArrayHelper
::
merge
(
return
yii\helpers\ArrayHelper
::
merge
(
require
(
__DIR__
.
'/../../../config/web.php'
),
require
(
__DIR__
.
'/../../../config/web.php'
),
require
(
__DIR__
.
'/
../_
config.php'
),
require
(
__DIR__
.
'/config.php'
),
[
[
'components'
=>
[
'components'
=>
[
'db'
=>
[
'db'
=>
[
...
...
apps/basic/tests/codeception/
unit/_config
.php
→
apps/basic/tests/codeception/
config/unit
.php
View file @
c33214b3
<?php
<?php
/**
* Application configuration for unit tests
*/
return
yii\helpers\ArrayHelper
::
merge
(
return
yii\helpers\ArrayHelper
::
merge
(
require
(
__DIR__
.
'/../../../config/web.php'
),
require
(
__DIR__
.
'/../../../config/web.php'
),
require
(
__DIR__
.
'/
../_
config.php'
),
require
(
__DIR__
.
'/config.php'
),
[
[
'components'
=>
[
'components'
=>
[
'db'
=>
[
'db'
=>
[
...
...
apps/basic/tests/codeception/functional.suite.yml
View file @
c33214b3
...
@@ -13,4 +13,4 @@ modules:
...
@@ -13,4 +13,4 @@ modules:
-
Yii2
-
Yii2
config
:
config
:
Yii2
:
Yii2
:
configFile
:
'
codeception/
functional/_config
.php'
configFile
:
'
codeception/
config/functional
.php'
apps/basic/tests/codeception/functional/_bootstrap.php
View file @
c33214b3
<?php
<?php
new
yii\web\Application
(
require
(
dirname
(
__DIR__
)
.
'/config/functional.php'
));
new
yii\web\Application
(
require
(
__DIR__
.
'/_config.php'
));
apps/basic/web/index-test.php
View file @
c33214b3
...
@@ -11,6 +11,6 @@ defined('YII_ENV') or define('YII_ENV', 'test');
...
@@ -11,6 +11,6 @@ defined('YII_ENV') or define('YII_ENV', 'test');
require
(
__DIR__
.
'/../vendor/autoload.php'
);
require
(
__DIR__
.
'/../vendor/autoload.php'
);
require
(
__DIR__
.
'/../vendor/yiisoft/yii2/Yii.php'
);
require
(
__DIR__
.
'/../vendor/yiisoft/yii2/Yii.php'
);
$config
=
require
(
__DIR__
.
'/../tests/codeception/
acceptance/_config
.php'
);
$config
=
require
(
__DIR__
.
'/../tests/codeception/
config/acceptance
.php'
);
(
new
yii\web\Application
(
$config
))
->
run
();
(
new
yii\web\Application
(
$config
))
->
run
();
extensions/codeception/TestCase.php
View file @
c33214b3
...
@@ -31,7 +31,7 @@ class TestCase extends Test
...
@@ -31,7 +31,7 @@ class TestCase extends Test
* The application configuration array may contain an optional `class` element which specifies the class
* The application configuration array may contain an optional `class` element which specifies the class
* name of the application instance to be created. By default, a [[\yii\web\Application]] instance will be created.
* name of the application instance to be created. By default, a [[\yii\web\Application]] instance will be created.
*/
*/
public
$appConfig
=
'@codeception/
unit/_config
.php'
;
public
$appConfig
=
'@codeception/
config/unit
.php'
;
/**
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment