Skip to content

Commit 2fe4f94

Browse files
authored
Merge pull request #8047 from kenjis/docs-testing-service-reset
docs: add note for routes after calling resetServices()
2 parents dd02f5e + 1f753bc commit 2fe4f94

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

user_guide_src/source/testing/overview.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,10 @@ Removes all mocked classes from the Services class, bringing it back to its orig
244244

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

247+
.. note:: This method resets the all states of Services, and the ``RouteCollection``
248+
will have no routes. If you want to use your routes to be loaded, you need to
249+
call the ``loadRoutes()`` method like ``Services::routes()->loadRoutes()``.
250+
247251
Services::resetSingle(string $name)
248252
-----------------------------------
249253

0 commit comments

Comments
 (0)