You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: doc/configuration.md
+5
Original file line number
Diff line number
Diff line change
@@ -7,11 +7,16 @@ Here is the full configuration with default values:
7
7
liip_test_fixtures:
8
8
keep_database_and_schema: false
9
9
cache_metadata: true
10
+
cache_db: ~
10
11
```
11
12
12
13
- `keep_database_and_schema`: pass it to `true` to avoid deleting and creating the database and schema before each test, you'll have to create the database schema before running your tests:
13
14
1. create database with `bin/console --env=test doctrine:database:create`:
14
15
2. create schema with `bin/console --env=test doctrine:schema:update --force` or `bin/console --env=test doctrine:migrations:migrate --no-interaction`
15
16
- `cache_metadata`: using the cache slightly improve the performance
17
+
- `cache_db`: an array with a storage as key and a service as value, examples :
Copy file name to clipboardexpand all lines: doc/database.md
+37
Original file line number
Diff line number
Diff line change
@@ -79,6 +79,9 @@ Methods
79
79
80
80
It also give access to other helpers:
81
81
82
+
-`setDatabaseCacheEnabled()` accept `true` or `false` to disable the cache
83
+
- you can call `$this->databaseTool->withDatabaseCacheEnabled(false)->loadFixtures(…)` to disable the cache on-demand
84
+
82
85
-`setPurgeMode()` accept `true` or `false` to disable purging the database
83
86
- you can call `$this->databaseTool->withPurgeMode(false)->loadFixtures(…)` to disable the purging on-demand
84
87
@@ -106,6 +109,40 @@ Tips for Fixture Loading Tests
106
109
107
110
NB: If you have an existing Doctrine configuration which uses slaves be sure to separate out the configuration for the slaves. Further detail is provided at the bottom of this README.
108
111
112
+
2. In order to run your tests even faster, use LiipFunctionalBundle cached database.
113
+
This will create backups of the initial databases (with all fixtures loaded)
114
+
and re-load them when required.
115
+
116
+
**Attention: you need Doctrine >= 2.2 to use this feature.**
0 commit comments