Skip to content

Commit 018dc89

Browse files
iamdtoweaverryan
authored andcommitted
Add missing configuration-block
1 parent 4a486ff commit 018dc89

File tree

1 file changed

+36
-34
lines changed

1 file changed

+36
-34
lines changed

cookbook/testing/database.rst

Lines changed: 36 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -111,40 +111,42 @@ to be able to clear the database before every test.
111111
To do this, you can specify a database configuration which overwrites the default
112112
configuration:
113113

114-
.. code-block:: yaml
115-
116-
# app/config/config_test.yml
117-
doctrine:
118-
# ...
119-
dbal:
120-
host: localhost
121-
dbname: testdb
122-
user: testdb
123-
password: testdb
124-
125-
.. code-block:: xml
126-
127-
<!-- app/config/config_test.xml -->
128-
<doctrine:config>
129-
<doctrine:dbal
130-
host="localhost"
131-
dbname="testdb"
132-
user="testdb"
133-
password="testdb"
134-
>
135-
</doctrine:config>
136-
137-
.. code-block:: php
138-
139-
// app/config/config_test.php
140-
$configuration->loadFromExtension('doctrine', array(
141-
'dbal' => array(
142-
'host' => 'localhost',
143-
'dbname' => 'testdb',
144-
'user' => 'testdb',
145-
'password' => 'testdb',
146-
),
147-
));
114+
.. configuration-block::
115+
116+
.. code-block:: yaml
117+
118+
# app/config/config_test.yml
119+
doctrine:
120+
# ...
121+
dbal:
122+
host: localhost
123+
dbname: testdb
124+
user: testdb
125+
password: testdb
126+
127+
.. code-block:: xml
128+
129+
<!-- app/config/config_test.xml -->
130+
<doctrine:config>
131+
<doctrine:dbal
132+
host="localhost"
133+
dbname="testdb"
134+
user="testdb"
135+
password="testdb"
136+
>
137+
</doctrine:config>
138+
139+
.. code-block:: php
140+
141+
// app/config/config_test.php
142+
$configuration->loadFromExtension('doctrine', array(
143+
'dbal' => array(
144+
'host' => 'localhost',
145+
'dbname' => 'testdb',
146+
'user' => 'testdb',
147+
'password' => 'testdb',
148+
),
149+
));
148150
149151
Make sure that your database runs on localhost and has the defined database and
150152
user credentials set up.

0 commit comments

Comments
 (0)