Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
docker-yii2-app
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dmstr
docker-yii2-app
Commits
2bff108e
Commit
2bff108e
authored
Jun 09, 2016
by
Tobias Munk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated testing
parent
49f477bb
Pipeline
#10479
failed with stages
in 15 seconds
Changes
11
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
2740 additions
and
13 deletions
+2740
-13
README.md
README.md
+8
-1
codeception.yml
codeception.yml
+2
-7
.env-dist
tests/.env-dist
+3
-1
test.php
tests/codeception/_config/test.php
+26
-0
FunctionalTester.php
tests/codeception/_support/FunctionalTester.php
+26
-0
FunctionalTesterActions.php
...deception/_support/_generated/FunctionalTesterActions.php
+2640
-0
UnitTesterActions.php
tests/codeception/_support/_generated/UnitTesterActions.php
+1
-1
functional.suite.yml
tests/codeception/functional.suite.yml
+16
-0
ErrorPageCept.php
tests/codeception/functional/ErrorPageCept.php
+10
-0
_bootstrap.php
tests/codeception/functional/_bootstrap.php
+3
-0
docker-compose.test.yml
tests/docker-compose.test.yml
+5
-3
No files found.
README.md
View file @
2bff108e
...
...
@@ -54,8 +54,15 @@ Run package update in container
$ yii help
## Test
cd tests
cp .env-dist .env
Run tests in codeception (
`forrest`
) container
$ codecept run
docker-compose run forrest run
> :info: This is equivalent to `codecept run` inside the tester container
### CLI
...
...
codeception.yml
View file @
2bff108e
...
...
@@ -12,10 +12,5 @@ settings:
extensions
:
enabled
:
-
Codeception\Extension\RunFailed
modules
:
config
:
Db
:
dsn
:
'
'
user
:
'
'
password
:
'
'
dump
:
tests/codeception/_data/dump.sql
config
:
test_entry_url
:
http://web:80/index.php
\ No newline at end of file
tests/.env-dist
View file @
2bff108e
COMPOSE_PROJECT_NAME=test-yii2-app
COMPOSE_FILE=../docker-compose.yml:./docker-compose.test.yml
\ No newline at end of file
COMPOSE_FILE=../docker-compose.yml:./docker-compose.test.yml
STACK_PHP_IMAGE=dmstr/yii2-app
\ No newline at end of file
tests/codeception/_config/test.php
0 → 100644
View file @
2bff108e
<?php
/**
* @link http://www.diemeisterei.de/
* @copyright Copyright (c) 2016 diemeisterei GmbH, Stuttgart
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
$_SERVER
[
'SCRIPT_FILENAME'
]
=
YII_TEST_ENTRY_FILE
;
$_SERVER
[
'SCRIPT_NAME'
]
=
YII_TEST_ENTRY_URL
;
$_SERVER
[
'HOST_NAME'
]
=
'web'
;
// TODO: Functional tests load CLI config by default, these are "web-overrides"
$applicationType
=
'web'
;
return
yii\helpers\ArrayHelper
::
merge
(
require
(
__DIR__
.
'/../../../src/config/main.php'
),
[
'components'
=>
[
'request'
=>
[
'cookieValidationKey'
=>
'FUNCTIONAL_TESTING'
],
]
]
);
\ No newline at end of file
tests/codeception/_support/FunctionalTester.php
0 → 100644
View file @
2bff108e
<?php
/**
* Inherited Methods
* @method void wantToTest($text)
* @method void wantTo($text)
* @method void execute($callable)
* @method void expectTo($prediction)
* @method void expect($prediction)
* @method void amGoingTo($argumentation)
* @method void am($role)
* @method void lookForwardTo($achieveValue)
* @method void comment($description)
* @method \Codeception\Lib\Friend haveFriend($name, $actorClass = NULL)
*
* @SuppressWarnings(PHPMD)
*/
class
FunctionalTester
extends
\Codeception\Actor
{
use
_generated\FunctionalTesterActions
;
/**
* Define custom actions here
*/
}
tests/codeception/_support/_generated/FunctionalTesterActions.php
0 → 100644
View file @
2bff108e
This diff is collapsed.
Click to expand it.
tests/codeception/_support/_generated/UnitTesterActions.php
View file @
2bff108e
<?php
//[STAMP]
19539257036018fbf13475beeeb1c2f5
<?php
//[STAMP]
efa60a632309a7a8ed739cd59858eef3
namespace
_generated
;
// This class was automatically generated by build task
...
...
tests/codeception/functional.suite.yml
0 → 100755
View file @
2bff108e
# Codeception Test Suite Configuration
#
# Suite for functional (integration) tests
# Emulate web requests and make application process them
# Include one of framework modules (Symfony2, Yii2, Laravel5) to use it
class_name
:
FunctionalTester
modules
:
enabled
:
# add framework module here
#- \Helper\Functional
-
Filesystem
-
Yii2
config
:
Yii2
:
configFile
:
'
tests/codeception/_config/test.php'
tests/codeception/functional/ErrorPageCept.php
0 → 100755
View file @
2bff108e
<?php
// @group mandatory
$I
=
new
FunctionalTester
(
$scenario
);
$I
->
wantTo
(
'ensure that error page works'
);
$I
->
amOnPage
(
'/_this_page_does_not_exist_'
);
$I
->
seeResponseCodeIs
(
404
);
$I
->
see
(
'Not Found'
);
tests/codeception/functional/_bootstrap.php
0 → 100755
View file @
2bff108e
<?php
$config
=
require
(
dirname
(
__DIR__
)
.
'/_config/test.php'
);
new
yii\web\Application
(
$config
);
tests/docker-compose.test.yml
View file @
2bff108e
version
:
'
2'
services
:
php
:
codecept
:
image
:
codeception/codeception
environment
:
-
YII_ENV=test
volumes
:
-
./tests:/app/tests
-
./codeception.yml:/app/codeception.yml
-
./:/project
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