From 1f753bcb3a0f5a59e771b14d25d214275e4454ca Mon Sep 17 00:00:00 2001 From: kenjis Date: Mon, 16 Oct 2023 15:50:57 +0900 Subject: [PATCH] docs: add note for routes after calling resetServices() --- user_guide_src/source/testing/overview.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/user_guide_src/source/testing/overview.rst b/user_guide_src/source/testing/overview.rst index 7622339f8f0c..d969f73cdc41 100644 --- a/user_guide_src/source/testing/overview.rst +++ b/user_guide_src/source/testing/overview.rst @@ -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) -----------------------------------