aboutsummaryrefslogtreecommitdiffhomepage
path: root/app
diff options
context:
space:
mode:
authorJérémy Benoist <j0k3r@users.noreply.github.com>2017-06-01 07:58:17 +0200
committerGitHub <noreply@github.com>2017-06-01 07:58:17 +0200
commit2a0eec07a5630401a9ceb7add65604f79238f10c (patch)
treebab2f2f763d4dca9f273a8ec1848f5da6c03ed20 /app
parent757ec837bea7f57dcefb71b3b90c66299ed6a922 (diff)
parent7ab5eb9508921d84b4b4ec84a59135d536da748e (diff)
downloadwallabag-2a0eec07a5630401a9ceb7add65604f79238f10c.tar.gz
wallabag-2a0eec07a5630401a9ceb7add65604f79238f10c.tar.zst
wallabag-2a0eec07a5630401a9ceb7add65604f79238f10c.zip
Merge pull request #3137 from aaa2000/isolated-tests
Isolated tests
Diffstat (limited to 'app')
-rw-r--r--app/AppKernel.php4
-rw-r--r--app/config/config_test.yml3
-rw-r--r--app/config/parameters_test.yml3
-rw-r--r--app/config/tests/parameters_test.mysql.yml1
-rw-r--r--app/config/tests/parameters_test.pgsql.yml1
-rw-r--r--app/config/tests/parameters_test.sqlite.yml5
6 files changed, 14 insertions, 3 deletions
diff --git a/app/AppKernel.php b/app/AppKernel.php
index b9293498..c50783a6 100644
--- a/app/AppKernel.php
+++ b/app/AppKernel.php
@@ -48,6 +48,10 @@ class AppKernel extends Kernel
48 $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle(); 48 $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
49 $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle(); 49 $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
50 $bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(); 50 $bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle();
51
52 if ('test' === $this->getEnvironment()) {
53 $bundles[] = new DAMA\DoctrineTestBundle\DAMADoctrineTestBundle();
54 }
51 } 55 }
52 56
53 return $bundles; 57 return $bundles;
diff --git a/app/config/config_test.yml b/app/config/config_test.yml
index f5e2c25e..c620c359 100644
--- a/app/config/config_test.yml
+++ b/app/config/config_test.yml
@@ -29,7 +29,8 @@ doctrine:
29 user: "%test_database_user%" 29 user: "%test_database_user%"
30 password: "%test_database_password%" 30 password: "%test_database_password%"
31 charset: "%test_database_charset%" 31 charset: "%test_database_charset%"
32 path: "%test_database_path%" 32 path: "%env(TEST_DATABASE_PATH)%"
33
33 orm: 34 orm:
34 metadata_cache_driver: 35 metadata_cache_driver:
35 type: service 36 type: service
diff --git a/app/config/parameters_test.yml b/app/config/parameters_test.yml
index 5f2e25bb..010785e6 100644
--- a/app/config/parameters_test.yml
+++ b/app/config/parameters_test.yml
@@ -5,5 +5,6 @@ parameters:
5 test_database_name: null 5 test_database_name: null
6 test_database_user: null 6 test_database_user: null
7 test_database_password: null 7 test_database_password: null
8 test_database_path: '%kernel.root_dir%/../data/db/wallabag_test.sqlite' 8 test_database_path: "%env(TEST_DATABASE_PATH)%"
9 env(TEST_DATABASE_PATH): "%kernel.root_dir%/../data/db/wallabag_test.sqlite"
9 test_database_charset: utf8 10 test_database_charset: utf8
diff --git a/app/config/tests/parameters_test.mysql.yml b/app/config/tests/parameters_test.mysql.yml
index bca2d466..36b227fb 100644
--- a/app/config/tests/parameters_test.mysql.yml
+++ b/app/config/tests/parameters_test.mysql.yml
@@ -6,4 +6,5 @@ parameters:
6 test_database_user: root 6 test_database_user: root
7 test_database_password: ~ 7 test_database_password: ~
8 test_database_path: ~ 8 test_database_path: ~
9 env(TEST_DATABASE_PATH): ~
9 test_database_charset: utf8mb4 10 test_database_charset: utf8mb4
diff --git a/app/config/tests/parameters_test.pgsql.yml b/app/config/tests/parameters_test.pgsql.yml
index 3e18d4a0..60f51df6 100644
--- a/app/config/tests/parameters_test.pgsql.yml
+++ b/app/config/tests/parameters_test.pgsql.yml
@@ -6,4 +6,5 @@ parameters:
6 test_database_user: travis 6 test_database_user: travis
7 test_database_password: ~ 7 test_database_password: ~
8 test_database_path: ~ 8 test_database_path: ~
9 env(TEST_DATABASE_PATH): ~
9 test_database_charset: utf8 10 test_database_charset: utf8
diff --git a/app/config/tests/parameters_test.sqlite.yml b/app/config/tests/parameters_test.sqlite.yml
index b8a5f41a..5c731bf5 100644
--- a/app/config/tests/parameters_test.sqlite.yml
+++ b/app/config/tests/parameters_test.sqlite.yml
@@ -5,5 +5,8 @@ parameters:
5 test_database_name: ~ 5 test_database_name: ~
6 test_database_user: ~ 6 test_database_user: ~
7 test_database_password: ~ 7 test_database_password: ~
8 test_database_path: "%kernel.root_dir%/../data/db/wallabag_test.sqlite" 8 # Using an environnement variable in order to avoid the error "attempt to write a readonly database"
9 # when the schema is dropped then recreate
10 test_database_path: "%env(TEST_DATABASE_PATH)%"
11 env(TEST_DATABASE_PATH): "%kernel.root_dir%/../data/db/wallabag_test.sqlite"
9 test_database_charset: utf8 12 test_database_charset: utf8