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