Commit bb2f45b4 authored by Tobias Munk's avatar Tobias Munk

fixed tests

parent e966933d
......@@ -46,6 +46,11 @@ services:
#- ./web/assets:/app/web/assets
#- ./runtime:/app/runtime
worker:
build: .
depends_on:
- db
db:
#command: --character-set-server=utf8 --collation-server=utf8_general_ci
image: percona:5.7
......
version: '2'
services:
php:
\ No newline at end of file
php:
worker:
command: 'yii resque/work "*"'
volumes_from:
- php
depends_on:
- db
- redis
redis:
image: redis:3
\ No newline at end of file
<?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['HOST_NAME'] = 'web';
$_SERVER['REQUEST_TIME'] = time();
// For functional and unit tests
defined('APP_TYPE') or define('APP_TYPE', 'web');
return yii\helpers\ArrayHelper::merge(
require(__DIR__ . '/../../../src/config/main.php'),
[
'language' => 'en',
'components' => [
'request' => [
'cookieValidationKey' => 'FUNCTIONAL_TESTING'
],
'urlManager' => [
'scriptUrl' => '',
'enableDefaultLanguageUrlCode' => false,
]
]
]
);
\ No newline at end of file
......@@ -7,24 +7,10 @@
* file that was distributed with this source code.
*/
$_SERVER['SCRIPT_FILENAME'] = YII_TEST_ENTRY_FILE;
$_SERVER['SCRIPT_NAME'] = YII_TEST_ENTRY_URL;
// "Faked" values for testing
$_SERVER['HOST_NAME'] = 'web';
$_SERVER['REQUEST_TIME'] = time();
// 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'
],
'urlManager' => [
'enableDefaultLanguageUrlCode' => false,
]
]
]
);
\ No newline at end of file
return [
'language' => 'en',
];
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -7,10 +7,9 @@
class_name: FunctionalTester
modules:
enabled:
# add framework module here
#- \Helper\Functional
- \Helper\Functional
- Filesystem
- Yii2
config:
Yii2:
configFile: 'codeception/_config/test.php'
cleanup: false
\ No newline at end of file
......@@ -6,5 +6,6 @@ class_name: UnitTester
modules:
enabled:
- Asserts
#- Yii2
#- \Helper\Unit
- \Helper\Unit
- Yii2:
part: [orm, email]
......@@ -14,6 +14,7 @@ services:
depends_on:
- db
- firefox
- mailcatcher
environment:
- YII_ENV=test
- PHP_ENABLE_XDEBUG=${PHP_ENABLE_XDEBUG}
......@@ -37,6 +38,8 @@ services:
default:
aliases:
- web
worker:
image: ${STACK_PHP_IMAGE}
db:
image: percona:5.6
environment:
......@@ -51,4 +54,8 @@ services:
- no_proxy=localhost
ports:
- '4444'
- '5900'
\ No newline at end of file
- '5900'
mailcatcher:
image: nisenabe/mailcatcher
ports:
- '1080'
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment