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
6c88467a
Commit
6c88467a
authored
Nov 19, 2014
by
Anton Andersen
Committed by
Alexander Makarov
Nov 27, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #6103: Improved codeception config in app templates to ease testing of…
Fixes #6103: Improved codeception config in app templates to ease testing of advanced app on multiple hosts
parent
af50f5a2
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
27 additions
and
19 deletions
+27
-19
_bootstrap.php
apps/advanced/tests/codeception/backend/_bootstrap.php
+3
-2
acceptance.suite.yml
apps/advanced/tests/codeception/backend/acceptance.suite.yml
+3
-2
codeception.yml
apps/advanced/tests/codeception/backend/codeception.yml
+2
-2
_bootstrap.php
apps/advanced/tests/codeception/common/_bootstrap.php
+1
-0
_bootstrap.php
apps/advanced/tests/codeception/console/_bootstrap.php
+1
-0
_bootstrap.php
apps/advanced/tests/codeception/frontend/_bootstrap.php
+3
-2
acceptance.suite.yml
.../advanced/tests/codeception/frontend/acceptance.suite.yml
+3
-2
codeception.yml
apps/advanced/tests/codeception/frontend/codeception.yml
+2
-2
codeception.yml
apps/basic/tests/codeception.yml
+3
-3
_bootstrap.php
apps/basic/tests/codeception/_bootstrap.php
+3
-2
acceptance.suite.yml
apps/basic/tests/codeception/acceptance.suite.yml
+3
-2
No files found.
apps/advanced/tests/codeception/backend/_bootstrap.php
View file @
6c88467a
...
@@ -4,7 +4,7 @@ defined('YII_ENV') or define('YII_ENV', 'test');
...
@@ -4,7 +4,7 @@ defined('YII_ENV') or define('YII_ENV', 'test');
defined
(
'YII_APP_BASE_PATH'
)
or
define
(
'YII_APP_BASE_PATH'
,
dirname
(
dirname
(
dirname
(
__DIR__
))));
defined
(
'YII_APP_BASE_PATH'
)
or
define
(
'YII_APP_BASE_PATH'
,
dirname
(
dirname
(
dirname
(
__DIR__
))));
defined
(
'YII_BACKEND_TEST_ENTRY_URL'
)
or
define
(
'YII_BACKEND_TEST_ENTRY_URL'
,
\Codeception\Configuration
::
config
()[
'config'
][
'test_entry_url'
]
);
defined
(
'YII_BACKEND_TEST_ENTRY_URL'
)
or
define
(
'YII_BACKEND_TEST_ENTRY_URL'
,
parse_url
(
\Codeception\Configuration
::
config
()[
'config'
][
'test_entry_url'
],
PHP_URL_PATH
)
);
defined
(
'YII_TEST_BACKEND_ENTRY_FILE'
)
or
define
(
'YII_TEST_BACKEND_ENTRY_FILE'
,
YII_APP_BASE_PATH
.
'/backend/web/index-test.php'
);
defined
(
'YII_TEST_BACKEND_ENTRY_FILE'
)
or
define
(
'YII_TEST_BACKEND_ENTRY_FILE'
,
YII_APP_BASE_PATH
.
'/backend/web/index-test.php'
);
require_once
(
YII_APP_BASE_PATH
.
'/vendor/autoload.php'
);
require_once
(
YII_APP_BASE_PATH
.
'/vendor/autoload.php'
);
...
@@ -17,6 +17,7 @@ require_once(YII_APP_BASE_PATH . '/backend/config/bootstrap.php');
...
@@ -17,6 +17,7 @@ require_once(YII_APP_BASE_PATH . '/backend/config/bootstrap.php');
// the entry script file path for functional and acceptance tests
// the entry script file path for functional and acceptance tests
$_SERVER
[
'SCRIPT_FILENAME'
]
=
YII_TEST_BACKEND_ENTRY_FILE
;
$_SERVER
[
'SCRIPT_FILENAME'
]
=
YII_TEST_BACKEND_ENTRY_FILE
;
$_SERVER
[
'SCRIPT_NAME'
]
=
YII_BACKEND_TEST_ENTRY_URL
;
$_SERVER
[
'SCRIPT_NAME'
]
=
YII_BACKEND_TEST_ENTRY_URL
;
$_SERVER
[
'SERVER_NAME'
]
=
'localhost'
;
$_SERVER
[
'SERVER_NAME'
]
=
parse_url
(
\Codeception\Configuration
::
config
()[
'config'
][
'test_entry_url'
],
PHP_URL_HOST
);
$_SERVER
[
'SERVER_PORT'
]
=
parse_url
(
\Codeception\Configuration
::
config
()[
'config'
][
'test_entry_url'
],
PHP_URL_PORT
)
?:
'80'
;
Yii
::
setAlias
(
'@tests'
,
dirname
(
dirname
(
__DIR__
)));
Yii
::
setAlias
(
'@tests'
,
dirname
(
dirname
(
__DIR__
)));
apps/advanced/tests/codeception/backend/acceptance.suite.yml
View file @
6c88467a
...
@@ -20,8 +20,9 @@ modules:
...
@@ -20,8 +20,9 @@ modules:
# - WebDriver
# - WebDriver
config
:
config
:
PhpBrowser
:
PhpBrowser
:
url
:
'
http://localhost:8080'
# PLEASE ADJUST IT TO THE ACTUAL ENTRY POINT WITHOUT PATH INFO
url
:
http://localhost:8080
# WebDriver:
# WebDriver:
# url:
'http://localhost'
# url:
http://localhost:8080
# browser: firefox
# browser: firefox
# restart: true
# restart: true
apps/advanced/tests/codeception/backend/codeception.yml
View file @
6c88467a
...
@@ -12,6 +12,6 @@ settings:
...
@@ -12,6 +12,6 @@ settings:
memory_limit
:
1024M
memory_limit
:
1024M
log
:
true
log
:
true
config
:
config
:
# the entry script URL (with
out
host info) for functional and acceptance tests
# the entry script URL (with host info) for functional and acceptance tests
# PLEASE ADJUST IT TO THE ACTUAL ENTRY SCRIPT URL
# PLEASE ADJUST IT TO THE ACTUAL ENTRY SCRIPT URL
test_entry_url
:
/backend/web/index-test.php
test_entry_url
:
http://localhost:8080
/backend/web/index-test.php
apps/advanced/tests/codeception/common/_bootstrap.php
View file @
6c88467a
...
@@ -10,5 +10,6 @@ require_once(YII_APP_BASE_PATH . '/common/config/bootstrap.php');
...
@@ -10,5 +10,6 @@ require_once(YII_APP_BASE_PATH . '/common/config/bootstrap.php');
// set correct script paths
// set correct script paths
$_SERVER
[
'SERVER_NAME'
]
=
'localhost'
;
$_SERVER
[
'SERVER_NAME'
]
=
'localhost'
;
$_SERVER
[
'SERVER_PORT'
]
=
'80'
;
Yii
::
setAlias
(
'@tests'
,
dirname
(
dirname
(
__DIR__
)));
Yii
::
setAlias
(
'@tests'
,
dirname
(
dirname
(
__DIR__
)));
apps/advanced/tests/codeception/console/_bootstrap.php
View file @
6c88467a
...
@@ -11,5 +11,6 @@ require_once(YII_APP_BASE_PATH . '/console/config/bootstrap.php');
...
@@ -11,5 +11,6 @@ require_once(YII_APP_BASE_PATH . '/console/config/bootstrap.php');
// set correct script paths
// set correct script paths
$_SERVER
[
'SERVER_NAME'
]
=
'localhost'
;
$_SERVER
[
'SERVER_NAME'
]
=
'localhost'
;
$_SERVER
[
'SERVER_PORT'
]
=
'80'
;
Yii
::
setAlias
(
'@tests'
,
dirname
(
dirname
(
__DIR__
)));
Yii
::
setAlias
(
'@tests'
,
dirname
(
dirname
(
__DIR__
)));
apps/advanced/tests/codeception/frontend/_bootstrap.php
View file @
6c88467a
...
@@ -4,7 +4,7 @@ defined('YII_ENV') or define('YII_ENV', 'test');
...
@@ -4,7 +4,7 @@ defined('YII_ENV') or define('YII_ENV', 'test');
defined
(
'YII_APP_BASE_PATH'
)
or
define
(
'YII_APP_BASE_PATH'
,
dirname
(
dirname
(
dirname
(
__DIR__
))));
defined
(
'YII_APP_BASE_PATH'
)
or
define
(
'YII_APP_BASE_PATH'
,
dirname
(
dirname
(
dirname
(
__DIR__
))));
defined
(
'FRONTEND_ENTRY_URL'
)
or
define
(
'FRONTEND_ENTRY_URL'
,
\Codeception\Configuration
::
config
()[
'config'
][
'test_entry_url'
]
);
defined
(
'FRONTEND_ENTRY_URL'
)
or
define
(
'FRONTEND_ENTRY_URL'
,
parse_url
(
\Codeception\Configuration
::
config
()[
'config'
][
'test_entry_url'
],
PHP_URL_PATH
)
);
defined
(
'FRONTEND_ENTRY_FILE'
)
or
define
(
'FRONTEND_ENTRY_FILE'
,
YII_APP_BASE_PATH
.
'/frontend/web/index-test.php'
);
defined
(
'FRONTEND_ENTRY_FILE'
)
or
define
(
'FRONTEND_ENTRY_FILE'
,
YII_APP_BASE_PATH
.
'/frontend/web/index-test.php'
);
require_once
(
YII_APP_BASE_PATH
.
'/vendor/autoload.php'
);
require_once
(
YII_APP_BASE_PATH
.
'/vendor/autoload.php'
);
...
@@ -17,6 +17,7 @@ require_once(YII_APP_BASE_PATH . '/frontend/config/bootstrap.php');
...
@@ -17,6 +17,7 @@ require_once(YII_APP_BASE_PATH . '/frontend/config/bootstrap.php');
// the entry script file path for functional and acceptance tests
// the entry script file path for functional and acceptance tests
$_SERVER
[
'SCRIPT_FILENAME'
]
=
FRONTEND_ENTRY_FILE
;
$_SERVER
[
'SCRIPT_FILENAME'
]
=
FRONTEND_ENTRY_FILE
;
$_SERVER
[
'SCRIPT_NAME'
]
=
FRONTEND_ENTRY_URL
;
$_SERVER
[
'SCRIPT_NAME'
]
=
FRONTEND_ENTRY_URL
;
$_SERVER
[
'SERVER_NAME'
]
=
'localhost'
;
$_SERVER
[
'SERVER_NAME'
]
=
parse_url
(
\Codeception\Configuration
::
config
()[
'config'
][
'test_entry_url'
],
PHP_URL_HOST
);
$_SERVER
[
'SERVER_PORT'
]
=
parse_url
(
\Codeception\Configuration
::
config
()[
'config'
][
'test_entry_url'
],
PHP_URL_PORT
)
?:
'80'
;
Yii
::
setAlias
(
'@tests'
,
dirname
(
dirname
(
__DIR__
)));
Yii
::
setAlias
(
'@tests'
,
dirname
(
dirname
(
__DIR__
)));
apps/advanced/tests/codeception/frontend/acceptance.suite.yml
View file @
6c88467a
...
@@ -20,8 +20,9 @@ modules:
...
@@ -20,8 +20,9 @@ modules:
# - WebDriver
# - WebDriver
config
:
config
:
PhpBrowser
:
PhpBrowser
:
url
:
'
http://localhost:8080'
# PLEASE ADJUST IT TO THE ACTUAL ENTRY POINT WITHOUT PATH INFO
url
:
http://localhost:8080
# WebDriver:
# WebDriver:
# url:
'http://localhost'
# url:
http://localhost:8080
# browser: firefox
# browser: firefox
# restart: true
# restart: true
apps/advanced/tests/codeception/frontend/codeception.yml
View file @
6c88467a
...
@@ -12,6 +12,6 @@ settings:
...
@@ -12,6 +12,6 @@ settings:
memory_limit
:
1024M
memory_limit
:
1024M
log
:
true
log
:
true
config
:
config
:
# the entry script URL (with
out
host info) for functional and acceptance tests
# the entry script URL (with host info) for functional and acceptance tests
# PLEASE ADJUST IT TO THE ACTUAL ENTRY SCRIPT URL
# PLEASE ADJUST IT TO THE ACTUAL ENTRY SCRIPT URL
test_entry_url
:
/frontend/web/index-test.php
test_entry_url
:
http://localhost:8080
/frontend/web/index-test.php
apps/basic/tests/codeception.yml
View file @
6c88467a
...
@@ -11,6 +11,6 @@ settings:
...
@@ -11,6 +11,6 @@ settings:
log
:
true
log
:
true
colors
:
true
colors
:
true
config
:
config
:
# the entry script URL (with
out
host info) for functional and acceptance tests
# the entry script URL (with host info) for functional and acceptance tests
# PLEASE ADJUST IT TO THE ACTUAL ENTRY SCRIPT URL
# PLEASE ADJUST IT TO THE ACTUAL ENTRY SCRIPT URL
test_entry_url
:
/index-test.php
test_entry_url
:
http://localhost:8080/index-test.php
\ No newline at end of file
\ No newline at end of file
apps/basic/tests/codeception/_bootstrap.php
View file @
6c88467a
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
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'
);
defined
(
'YII_TEST_ENTRY_URL'
)
or
define
(
'YII_TEST_ENTRY_URL'
,
\Codeception\Configuration
::
config
()[
'config'
][
'test_entry_url'
]
);
defined
(
'YII_TEST_ENTRY_URL'
)
or
define
(
'YII_TEST_ENTRY_URL'
,
parse_url
(
\Codeception\Configuration
::
config
()[
'config'
][
'test_entry_url'
],
PHP_URL_PATH
)
);
defined
(
'YII_TEST_ENTRY_FILE'
)
or
define
(
'YII_TEST_ENTRY_FILE'
,
dirname
(
dirname
(
__DIR__
))
.
'/web/index-test.php'
);
defined
(
'YII_TEST_ENTRY_FILE'
)
or
define
(
'YII_TEST_ENTRY_FILE'
,
dirname
(
dirname
(
__DIR__
))
.
'/web/index-test.php'
);
require_once
(
__DIR__
.
'/../../vendor/autoload.php'
);
require_once
(
__DIR__
.
'/../../vendor/autoload.php'
);
...
@@ -10,6 +10,7 @@ require_once(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php');
...
@@ -10,6 +10,7 @@ require_once(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php');
$_SERVER
[
'SCRIPT_FILENAME'
]
=
YII_TEST_ENTRY_FILE
;
$_SERVER
[
'SCRIPT_FILENAME'
]
=
YII_TEST_ENTRY_FILE
;
$_SERVER
[
'SCRIPT_NAME'
]
=
YII_TEST_ENTRY_URL
;
$_SERVER
[
'SCRIPT_NAME'
]
=
YII_TEST_ENTRY_URL
;
$_SERVER
[
'SERVER_NAME'
]
=
'localhost'
;
$_SERVER
[
'SERVER_NAME'
]
=
parse_url
(
\Codeception\Configuration
::
config
()[
'config'
][
'test_entry_url'
],
PHP_URL_HOST
);
$_SERVER
[
'SERVER_PORT'
]
=
parse_url
(
\Codeception\Configuration
::
config
()[
'config'
][
'test_entry_url'
],
PHP_URL_PORT
)
?:
'80'
;
Yii
::
setAlias
(
'@tests'
,
dirname
(
__DIR__
));
Yii
::
setAlias
(
'@tests'
,
dirname
(
__DIR__
));
apps/basic/tests/codeception/acceptance.suite.yml
View file @
6c88467a
...
@@ -19,8 +19,9 @@ modules:
...
@@ -19,8 +19,9 @@ modules:
# - WebDriver
# - WebDriver
config
:
config
:
PhpBrowser
:
PhpBrowser
:
url
:
'
http://localhost:8080'
# PLEASE ADJUST IT TO THE ACTUAL ENTRY POINT WITHOUT PATH INFO
url
:
http://localhost:8080
# WebDriver:
# WebDriver:
# url:
'http://localhost'
# url:
http://localhost:8080
# browser: firefox
# browser: firefox
# restart: true
# restart: true
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