1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-06-27 16:36:00 +00:00

Merge pull request #3137 from aaa2000/isolated-tests

Isolated tests
This commit is contained in:
Jérémy Benoist 2017-06-01 07:58:17 +02:00 committed by GitHub
commit 2a0eec07a5
23 changed files with 464 additions and 284 deletions

View file

@ -48,6 +48,10 @@ class AppKernel extends Kernel
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
$bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle();
if ('test' === $this->getEnvironment()) {
$bundles[] = new DAMA\DoctrineTestBundle\DAMADoctrineTestBundle();
}
}
return $bundles;

View file

@ -29,7 +29,8 @@ doctrine:
user: "%test_database_user%"
password: "%test_database_password%"
charset: "%test_database_charset%"
path: "%test_database_path%"
path: "%env(TEST_DATABASE_PATH)%"
orm:
metadata_cache_driver:
type: service

View file

@ -5,5 +5,6 @@ parameters:
test_database_name: null
test_database_user: null
test_database_password: null
test_database_path: '%kernel.root_dir%/../data/db/wallabag_test.sqlite'
test_database_path: "%env(TEST_DATABASE_PATH)%"
env(TEST_DATABASE_PATH): "%kernel.root_dir%/../data/db/wallabag_test.sqlite"
test_database_charset: utf8

View file

@ -6,4 +6,5 @@ parameters:
test_database_user: root
test_database_password: ~
test_database_path: ~
env(TEST_DATABASE_PATH): ~
test_database_charset: utf8mb4

View file

@ -6,4 +6,5 @@ parameters:
test_database_user: travis
test_database_password: ~
test_database_path: ~
env(TEST_DATABASE_PATH): ~
test_database_charset: utf8

View file

@ -5,5 +5,8 @@ parameters:
test_database_name: ~
test_database_user: ~
test_database_password: ~
test_database_path: "%kernel.root_dir%/../data/db/wallabag_test.sqlite"
# Using an environnement variable in order to avoid the error "attempt to write a readonly database"
# when the schema is dropped then recreate
test_database_path: "%env(TEST_DATABASE_PATH)%"
env(TEST_DATABASE_PATH): "%kernel.root_dir%/../data/db/wallabag_test.sqlite"
test_database_charset: utf8