Skip to content

Commit

Permalink
doc: add warning about complex global state performance
Browse files Browse the repository at this point in the history
  • Loading branch information
kbond committed Nov 14, 2023
1 parent 81eb3b8 commit e41bbe8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1484,7 +1484,9 @@ Global State
~~~~~~~~~~~~

If you have an initial database state you want for all tests, you can set this in the config of the bundle. Accepted
values are: stories as service, "global" stories and invokable services.
values are: stories as service, "global" stories and invokable services. Global state is loaded before each using
the ``ResetDatabase`` trait. If you are using `DamaDoctrineTestBundle`_, it is only loaded once for the entire
test suite.

.. configuration-block::

Expand All @@ -1508,6 +1510,10 @@ values are: stories as service, "global" stories and invokable services.

The :ref:`ResetDatabase <enable-foundry-in-your-testcase>` trait is required when using global state.

.. warning::

Be aware that a complex global state could slow down your test suite.

PHPUnit Data Providers
~~~~~~~~~~~~~~~~~~~~~~

Expand Down

0 comments on commit e41bbe8

Please sign in to comment.