Skip to content

Commit

Permalink
Rework test infrastructure
Browse files Browse the repository at this point in the history
  • Loading branch information
Stoakes committed May 15, 2017
1 parent 97bb58b commit 26ab215
Show file tree
Hide file tree
Showing 11 changed files with 1,519 additions and 627 deletions.
7 changes: 3 additions & 4 deletions .travis.yml
Expand Up @@ -6,8 +6,7 @@ services:
script:
- cp docker-compose.yml.dist docker-compose.yml
- docker-compose build
- docker-compose run --rm web composer install -o -n
- docker-compose up -d
- docker-compose exec web sleep 60 && php bin/console doctrine:schema:create
- docker-compose exec web php bin/console doctrine:fixtures:load -n
# - docker-compose run --rm web composer install -o -n
- docker-compose run --rm web php bin/console cache:clear -e=test
- docker-compose run --rm web vendor/bin/behat ./features/ -f pretty
- docker-compose stop
14 changes: 10 additions & 4 deletions app/config/config_test.yml
Expand Up @@ -6,11 +6,17 @@ framework:
session:
storage_id: session.storage.mock_file
profiler:
collect: false
collect: false

web_profiler:
toolbar: false
intercept_redirects: false

swiftmailer:
disable_delivery: true

web_profiler:
toolbar: false
intercept_redirects: false
doctrine:
dbal:
driver: "pdo_sqlite"
path: "%kernel.cache_dir%/db.sqlite"
charset: "UTF8"
7 changes: 5 additions & 2 deletions behat.yml
Expand Up @@ -4,14 +4,17 @@ default:
suites:
default:
contexts:
- FeatureContext
- FeatureContext: { doctrine: "@doctrine", kernel: "@kernel" }
- Behatch\Context\DebugContext: ~

extensions:
Behat\Symfony2Extension:
kernel:
env: "test"
debug: "true"
debug: "false"
Behat\MinkExtension:
base_url: "http://localhost/"
sessions:
default:
symfony2: ~
Behatch\Extension: ~
Empty file modified bin/symfony_requirements 100644 → 100755
Empty file.
179 changes: 88 additions & 91 deletions composer.json
@@ -1,95 +1,92 @@
{
"name": "n7consulting/jeyser-crm",
"description": "ERP / CRM for Junior-Entreprises",
"license": "AGPL-3.0",
"type": "project",
"autoload": {
"psr-4": {
"": "src/",
"Incipio\\": "app/",
"Tests\\": "tests/"
},
"classmap": [ "app/AppKernel.php", "app/AppCache.php" ]
"name": "n7consulting/jeyser-crm",
"description": "ERP / CRM for Junior-Entreprises",
"license": "AGPL-3.0",
"type": "project",
"autoload": {
"psr-4": {
"": "src/",
"Incipio\\": "app/",
"Tests\\": "tests/"
},
"require": {
"php": ">=5.6",
"doctrine/doctrine-bundle": "~1.4",
"doctrine/doctrine-fixtures-bundle": "~2.3",
"doctrine/orm": "^2.5",
"egulias/email-validator": "~1.2",
"friendsofsymfony/comment-bundle": "~2.0",
"friendsofsymfony/jsrouting-bundle": "~1.1",
"friendsofsymfony/user-bundle": "^2.0",
"gedmo/doctrine-extensions": "~2.3",
"incenteev/composer-parameter-handler": "~2.0",
"ob/highcharts-bundle": "~1.2",
"sensio/distribution-bundle": "^5.0",
"sensio/framework-extra-bundle": "^3.0",
"sensio/generator-bundle": "^3.1",
"stof/doctrine-extensions-bundle": "~1.0",
"symfony/assetic-bundle": "~2.3",
"symfony/monolog-bundle": "~2.4",
"symfony/symfony": "^3.1",
"symfony/swiftmailer-bundle": "^2.3",
"twig/extensions": "~1.0",
"javiereguiluz/easyadmin-bundle": "^1.9",
"stoakes/form-bundle": "^3.0@dev",
"doctrine/doctrine-migrations-bundle": "^1.0",
"webmozart/key-value-store": "^1.0",
"webmozart/json": "^1.2"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^1.9",
"behat/behat": "^3.0",
"behat/symfony2-extension": "^2.0",
"behat/mink-extension": "^2.0",
"behat/mink-goutte-driver": "^1.1",
"behat/mink-selenium2-driver": "^1.2"
},
"scripts": {
"style:check": "php bin/php-cs-fixer fix --no-interaction --dry-run --diff -vvvv src/",
"style:fix": "php bin/php-cs-fixer fix -vvvv src/",
"test": "composer test:db",
"test:behat": "vendor/bin/behat",
"test:db": "php bin/console doctrine:schema:validate --ansi",
"db": "composer db:drop && composer db:create && composer db:seed",
"db:create": "php bin/console doctrine:schema:create --ansi",
"db:drop": "php bin/console doctrine:schema:drop --force --ansi",
"db:reload": "composer db:update && composer db:seed",
"db:seed": "php bin/console doctrine:fixtures:load -n --ansi",
"db:update": "php bin/console doctrine:schema:update --force --ansi",
"db:test": "composer db:test:drop && composer db:test:create && composer db:test:seed",
"db:test:create": "php bin/console doctrine:schema:create --env=test --ansi",
"db:test:drop": "php bin/console doctrine:schema:drop --env=test --force --ansi",
"db:test:seed": "php bin/console doctrine:fixtures:load --env=test -n --ansi",
"install:first": [
"php bin/console doctrine:schema:create -n --env=prod --ansi",
"php bin/console doctrine:fixtures:load -n --env=prod --ansi"
],
"post-install-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
],
"post-update-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
]
},
"extra": {
"symfony-app-dir": "app",
"symfony-bin-dir": "bin",
"symfony-var-dir": "var",
"symfony-web-dir": "web",
"symfony-tests-dir": "tests",
"symfony-assets-install": "relative",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
}
"classmap": [
"app/AppKernel.php",
"app/AppCache.php"
]
},
"require": {
"php": ">=5.6",
"doctrine/doctrine-bundle": "~1.4",
"doctrine/doctrine-fixtures-bundle": "~2.3",
"doctrine/orm": "^2.5",
"egulias/email-validator": "~1.2",
"friendsofsymfony/comment-bundle": "~2.0",
"friendsofsymfony/jsrouting-bundle": "~1.1",
"friendsofsymfony/user-bundle": "^2.0",
"gedmo/doctrine-extensions": "~2.3",
"incenteev/composer-parameter-handler": "~2.0",
"ob/highcharts-bundle": "~1.2",
"sensio/distribution-bundle": "^5.0",
"sensio/framework-extra-bundle": "^3.0",
"sensio/generator-bundle": "^3.1",
"stof/doctrine-extensions-bundle": "~1.0",
"symfony/assetic-bundle": "~2.3",
"symfony/monolog-bundle": "~2.4",
"symfony/symfony": "^3.1",
"symfony/swiftmailer-bundle": "^2.3",
"twig/extensions": "~1.0",
"javiereguiluz/easyadmin-bundle": "^1.9",
"stoakes/form-bundle": "^3.0@dev",
"doctrine/doctrine-migrations-bundle": "^1.0",
"webmozart/key-value-store": "^1.0",
"webmozart/json": "^1.2"
},
"require-dev": {
"behat/behat": "^3.1",
"behat/mink": "^1.7",
"behat/mink-browserkit-driver": "^1.3.1",
"behat/mink-extension": "^2.2",
"behat/symfony2-extension": "^2.1",
"behatch/contexts": "^2.6",
"phpunit/phpunit": "^5.0",
"sensio/generator-bundle": "^3.0",
"symfony/phpunit-bridge": "^3.0",
"friendsofphp/php-cs-fixer": "^1.9"
},
"scripts": {
"style:check": "./vendor/bin/php-cs-fixer fix --no-interaction --dry-run --diff -vvvv src/",
"style:fix": "./vendor/bin/php-cs-fixer fix -vvvv src/",
"test": "composer test:db",
"test:behat": "./vendor/bin/behat ./features/ -f pretty",
"test:db": "php bin/console doctrine:schema:validate --ansi",
"install:first": [
"php bin/console doctrine:schema:create -n --env=prod --ansi",
"php bin/console doctrine:fixtures:load -n --env=prod --ansi"
],
"post-install-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
],
"post-update-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
]
},
"extra": {
"symfony-app-dir": "app",
"symfony-bin-dir": "bin",
"symfony-var-dir": "var",
"symfony-web-dir": "web",
"symfony-tests-dir": "tests",
"symfony-assets-install": "relative",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
}
}
}

0 comments on commit 26ab215

Please sign in to comment.