Skip to content

Commit

Permalink
Merge pull request #8047 from kenjis/docs-testing-service-reset
Browse files Browse the repository at this point in the history
docs: add note for routes after calling resetServices()
  • Loading branch information
kenjis authored Oct 17, 2023
2 parents dd02f5e + 1f753bc commit 2fe4f94
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions user_guide_src/source/testing/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,10 @@ Removes all mocked classes from the Services class, bringing it back to its orig

You can also use the ``$this->resetServices()`` method that ``CIUnitTestCase`` provides.

.. note:: This method resets the all states of Services, and the ``RouteCollection``
will have no routes. If you want to use your routes to be loaded, you need to
call the ``loadRoutes()`` method like ``Services::routes()->loadRoutes()``.

Services::resetSingle(string $name)
-----------------------------------

Expand Down

0 comments on commit 2fe4f94

Please sign in to comment.