Commit 22eacf57 authored by Tobias Munk's avatar Tobias Munk

Merge commit 'dc1344ea' into develop

# Conflicts:
#	build/scripts/test.sh
#	tests/codeception/_support/_generated/CliTesterActions.php
#	tests/codeception/cli.suite.yml
#	tests/codeception/cli/_bootstrap.php
parents a7f5683a dc1344ea
Pipeline #8462 passed with stages
......@@ -55,6 +55,7 @@ setup: ##@docker setup application packages and database
clean: ##@docker remove application containers
$(DOCKER_COMPOSE) kill
$(DOCKER_COMPOSE) rm -fv
-$(DOCKER_COMPOSE) down
tests:
$(MAKE) build
......
......@@ -10,7 +10,7 @@ Requirements
------------
- [docker](https://docs.docker.com/engine/installation/)
- [docker-compose](https://docs.docker.com/compose/) **>=1.5.2**
- [docker-compose](https://docs.docker.com/compose/) **>=1.6.2**
> For alternative installation methods, such as composer, see the [docs](https://github.com/phundament/docs).
......
php:
image: app_php
volumes:
- /app
nginx:
volumes_from:
- php
ports:
- '40081:80'
version: '2'
services:
php:
image: app_php
volumes:
- /app
nginx:
volumes_from:
- php
ports:
- '40081:80'
php:
image: ${BUILD_PREFIX}_php
volumes:
- /app
environment:
- YII_ENV=prod
nginx:
volumes_from:
- php
ports:
- '80'
tester:
image: ${BUILD_PREFIX}_php
links:
- 'mariadb:DB'
- 'seleniumfirefox:HUB'
- 'nginx:WEB'
volumes:
- ./codeception.yml:/app/codeception.yml
- ./tests:/app/tests
environment:
- YII_ENV=test
seleniumfirefox:
image: selenium/standalone-firefox-debug:2.47.1
links:
- 'nginx:WEB'
ports:
- '4444'
- '5900'
version: '2'
services:
php:
image: ${BUILD_PREFIX}_php
volumes:
- /app
environment:
- YII_ENV=prod
- DB_PORT_3306_TCP_ADDR=db
- DB_PORT_3306_TCP_PORT=3306
nginx:
volumes_from:
- php
ports:
- '80'
networks:
default:
aliases:
- web
tester:
image: ${BUILD_PREFIX}_php
depends_on:
- seleniumfirefox
volumes:
- ./codeception.yml:/app/codeception.yml
- ./tests:/app/tests
environment:
- YII_ENV=test
- DB_PORT_3306_TCP_ADDR=db
- DB_PORT_3306_TCP_PORT=3306
- DB_ENV_MYSQL_ROOT_USER=root
- DB_ENV_MYSQL_ROOT_PASSWORD=secretadmin
seleniumfirefox:
image: selenium/standalone-firefox-debug:2.47.1
ports:
- '4444'
- '5900'
networks:
default:
aliases:
- hub
......@@ -43,7 +43,7 @@ set +e
# Check docker-compose
echo "docker-compose..."
DOCKER_COMPOSE_MIN_VERSION=1.5.1
DOCKER_COMPOSE_MIN_VERSION=1.6.2
if [[ $(docker-compose --version) =~ version[:]?\ ([^,]*)[,]? ]]; then
DOCKER_COMPOSE_VERSION=${BASH_REMATCH[1]}
echo "${DOCKER_COMPOSE_VERSION} >= ${DOCKER_COMPOSE_MIN_VERSION}"
......
......@@ -11,6 +11,6 @@ set -v
set +e
make TEST run-tests codecept_opts='unit,cli,functional,acceptance -g mandatory --html=_report_mandatory.html' || EXIT_CODE=1
make TEST run-tests codecept_opts='functional,unit,cli,acceptance -g mandatory --html=_report_mandatory.html' || EXIT_CODE=1
exit ${EXIT_CODE}
......@@ -608,16 +608,16 @@
},
{
"name": "dektrium/yii2-rbac",
"version": "v0.2.0",
"version": "0.3.0",
"source": {
"type": "git",
"url": "https://github.com/dektrium/yii2-rbac.git",
"reference": "c6d315a3c9652b3b1ced19fe105f65e6e09f375b"
"reference": "4c5c383f577256d34cbc37ed26809a8ff109b2ec"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/dektrium/yii2-rbac/zipball/c6d315a3c9652b3b1ced19fe105f65e6e09f375b",
"reference": "c6d315a3c9652b3b1ced19fe105f65e6e09f375b",
"url": "https://api.github.com/repos/dektrium/yii2-rbac/zipball/4c5c383f577256d34cbc37ed26809a8ff109b2ec",
"reference": "4c5c383f577256d34cbc37ed26809a8ff109b2ec",
"shasum": ""
},
"require": {
......@@ -654,7 +654,7 @@
"yii2",
"yii2-rbac"
],
"time": "2015-12-04 21:55:40"
"time": "2016-03-30 12:19:16"
},
{
"name": "dektrium/yii2-user",
......@@ -3073,16 +3073,16 @@
},
{
"name": "symfony/console",
"version": "v3.0.3",
"version": "v3.0.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "2ed5e2706ce92313d120b8fe50d1063bcfd12e04"
"reference": "6b1175135bc2a74c08a28d89761272de8beed8cd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/2ed5e2706ce92313d120b8fe50d1063bcfd12e04",
"reference": "2ed5e2706ce92313d120b8fe50d1063bcfd12e04",
"url": "https://api.github.com/repos/symfony/console/zipball/6b1175135bc2a74c08a28d89761272de8beed8cd",
"reference": "6b1175135bc2a74c08a28d89761272de8beed8cd",
"shasum": ""
},
"require": {
......@@ -3129,20 +3129,20 @@
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
"time": "2016-02-28 16:24:34"
"time": "2016-03-16 17:00:50"
},
{
"name": "symfony/event-dispatcher",
"version": "v3.0.3",
"version": "v3.0.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
"reference": "4dd5df31a28c0f82b41cb1e1599b74b5dcdbdafa"
"reference": "9002dcf018d884d294b1ef20a6f968efc1128f39"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/4dd5df31a28c0f82b41cb1e1599b74b5dcdbdafa",
"reference": "4dd5df31a28c0f82b41cb1e1599b74b5dcdbdafa",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/9002dcf018d884d294b1ef20a6f968efc1128f39",
"reference": "9002dcf018d884d294b1ef20a6f968efc1128f39",
"shasum": ""
},
"require": {
......@@ -3189,20 +3189,20 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com",
"time": "2016-01-27 05:14:46"
"time": "2016-03-10 10:34:12"
},
{
"name": "symfony/filesystem",
"version": "v3.0.3",
"version": "v3.0.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
"reference": "23ae8f9648d0a7fe94a47c8e20e5bf37c489a451"
"reference": "f82499a459dcade2ea56df94cc58b19c8bde3d20"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/filesystem/zipball/23ae8f9648d0a7fe94a47c8e20e5bf37c489a451",
"reference": "23ae8f9648d0a7fe94a47c8e20e5bf37c489a451",
"url": "https://api.github.com/repos/symfony/filesystem/zipball/f82499a459dcade2ea56df94cc58b19c8bde3d20",
"reference": "f82499a459dcade2ea56df94cc58b19c8bde3d20",
"shasum": ""
},
"require": {
......@@ -3238,20 +3238,20 @@
],
"description": "Symfony Filesystem Component",
"homepage": "https://symfony.com",
"time": "2016-02-23 15:16:06"
"time": "2016-03-27 10:24:39"
},
{
"name": "symfony/finder",
"version": "v3.0.3",
"version": "v3.0.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
"reference": "623bda0abd9aa29e529c8e9c08b3b84171914723"
"reference": "c54e407b35bc098916704e9fd090da21da4c4f52"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/finder/zipball/623bda0abd9aa29e529c8e9c08b3b84171914723",
"reference": "623bda0abd9aa29e529c8e9c08b3b84171914723",
"url": "https://api.github.com/repos/symfony/finder/zipball/c54e407b35bc098916704e9fd090da21da4c4f52",
"reference": "c54e407b35bc098916704e9fd090da21da4c4f52",
"shasum": ""
},
"require": {
......@@ -3287,7 +3287,7 @@
],
"description": "Symfony Finder Component",
"homepage": "https://symfony.com",
"time": "2016-01-27 05:14:46"
"time": "2016-03-10 11:13:05"
},
{
"name": "symfony/polyfill-mbstring",
......@@ -3350,16 +3350,16 @@
},
{
"name": "symfony/process",
"version": "v3.0.3",
"version": "v3.0.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
"reference": "dfecef47506179db2501430e732adbf3793099c8"
"reference": "e6f1f98bbd355d209a992bfff45e7edfbd4a0776"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/process/zipball/dfecef47506179db2501430e732adbf3793099c8",
"reference": "dfecef47506179db2501430e732adbf3793099c8",
"url": "https://api.github.com/repos/symfony/process/zipball/e6f1f98bbd355d209a992bfff45e7edfbd4a0776",
"reference": "e6f1f98bbd355d209a992bfff45e7edfbd4a0776",
"shasum": ""
},
"require": {
......@@ -3395,20 +3395,20 @@
],
"description": "Symfony Process Component",
"homepage": "https://symfony.com",
"time": "2016-02-02 13:44:19"
"time": "2016-03-30 10:41:14"
},
{
"name": "symfony/stopwatch",
"version": "v3.0.3",
"version": "v3.0.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/stopwatch.git",
"reference": "4a204804952ff267ace88cf499e0b4bb302a475e"
"reference": "6015187088421e9499d8f8316bdb396f8b806c06"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/stopwatch/zipball/4a204804952ff267ace88cf499e0b4bb302a475e",
"reference": "4a204804952ff267ace88cf499e0b4bb302a475e",
"url": "https://api.github.com/repos/symfony/stopwatch/zipball/6015187088421e9499d8f8316bdb396f8b806c06",
"reference": "6015187088421e9499d8f8316bdb396f8b806c06",
"shasum": ""
},
"require": {
......@@ -3444,7 +3444,7 @@
],
"description": "Symfony Stopwatch Component",
"homepage": "https://symfony.com",
"time": "2016-01-03 15:35:16"
"time": "2016-03-04 07:55:57"
},
{
"name": "yiisoft/yii2-apidoc",
......
# Phundament 4 - Local development overrides
# phd - local development overrides
php:
volumes:
- .:/app
environment:
- YII_ENV=dev
- YII_DEBUG=1
nginx:
ports:
- '40080:80'
volumes:
- .:/app
mariadb:
ports:
- '43306:3306'
version: '2'
services:
php:
volumes:
- .:/app
environment:
- YII_ENV=dev
- YII_DEBUG=1
- DB_PORT_3306_TCP_ADDR=db
- DB_PORT_3306_TCP_PORT=3306
- DB_ENV_MYSQL_ROOT_PASSWORD=secretadmin
nginx:
ports:
- '40080:80'
volumes:
- .:/app
# Phundament 4 - Application stack
# phd - application stack
php:
build: .
links:
- 'mariadb:DB'
version: '2'
services:
php:
build: .
depends_on:
- db
networks:
default:
aliases:
- phpfpm
nginx:
image: phundament/nginx-one:1.9
links:
- 'php:PHPFPM'
nginx:
image: phundament/nginx-one:1.9
depends_on:
- php
mariadb:
image: 'tutum/mariadb:10.1'
environment:
MARIADB_PASS: secretadmin
\ No newline at end of file
db:
image: 'percona:5.6'
environment:
MYSQL_ROOT_PASSWORD: secretadmin
......@@ -73,24 +73,15 @@ class DefaultController extends Controller
*/
public function actionViewConfig()
{
$config = $GLOBALS['config'];
$modules = $config['modules'];
unset($config['modules']);
$components = $config['components'];
unset($config['components']);
$params = $config['params'];
unset($config['params']);
$loadedModules = Metadata::getModules();
$loadedModulesDataProvider = new ArrayDataProvider(['allModels' => $loadedModules]);
return $this->render(
'view-config',
[
'config' => $config,
'modules' => $modules,
'components' => $components,
'params' => $params,
'params' => Yii::$app->params,
'components' => Yii::$app->getComponents(),
'modules' => Yii::$app->getModules(),
'loadedModulesDataProvider' => $loadedModulesDataProvider,
]
);
......
......@@ -3,6 +3,7 @@
namespace _;
use yii\helpers\Json;
use yii\helpers\VarDumper;
use yii\widgets\ListView;
?>
......@@ -20,19 +21,6 @@ use yii\widgets\ListView;
?>
</div>
<h2>Application</h2>
<?php foreach ($config as $name => $element): ?>
<div class="row">
<div class="col-sm-2">
<b><?= $name ?></b>
</div>
<div class="col-sm-10">
<pre>
<?= Json::encode($element, JSON_PRETTY_PRINT) ?>
</pre>
</div>
</div>
<?php endforeach ?>
<h2>Params</h2>
<?php foreach ($params as $name => $element): ?>
......@@ -71,7 +59,7 @@ use yii\widgets\ListView;
</div>
<div class="col-sm-10">
<pre>
<?= Json::encode($element, JSON_PRETTY_PRINT) ?>
<?= VarDumper::dumpAsString($element, 1, true) ?>
</pre>
</div>
</div>
......
<?php
namespace Helper;
// here you can define custom actions
// all public methods declared in helper class will be available in $I
class Cli extends \Codeception\Module
{
}
<?php //[STAMP] 31fee004955ab517a03846dd6eb8f864
<?php //[STAMP] c7e257881ae65da130272bfaf24b74ca
namespace _generated;
// This class was automatically generated by build task
......
<?php //[STAMP] 31109deb2bed4f1cc49b7a5da564f184
<?php //[STAMP] 4f2eb2df3b8bb8166772abb190d013af
namespace _generated;
// This class was automatically generated by build task
......
<?php //[STAMP] 974f919a852cd298a8111365e8f4d374
<?php //[STAMP] 5492c33b7accb7ec295964c80c532c61
namespace _generated;
// This class was automatically generated by build task
......
......@@ -17,7 +17,7 @@ modules:
url: 'http://web/'
config:
WebDriver:
host: HUB
host: hub
url: http://WEB:80/
browser: firefox
port: 4444
......@@ -29,7 +29,7 @@ env:
config:
WebDriver:
browser: 'chrome'
host: HUB
host: hub
window_size: 1280x720
firefox:
......
<?php
$I = new CliTester($scenario);
$I->wantTo('check asset bundling');
$I->runShellCommand('mkdir -p web/assets-prod/js');
$I->runShellCommand('yii asset src/config/assets-prod.php src/config/bundle-prod.php');
$I->seeInShellOutput('Output bundle configuration created at');
......@@ -15,14 +15,6 @@ class UserTest extends TestCase
parent::setUp();
}
/**
* @group mandatory
*/
public function testUserLogout()
{
$this->assertTrue(\Yii::$app->user->logout());
}
/**
* @group mandatory
*/
......@@ -40,4 +32,13 @@ class UserTest extends TestCase
$identity = User::findIdentity(99999);
$this->assertNull($identity);
}
/**
* @group mandatory
*/
public function testUserLogout()
{
$this->assertTrue(\Yii::$app->user->logout());
}
}
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