File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
user_guide_src/source/testing Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -69,13 +69,15 @@ Specifies the class name of the controller to test. The first parameter must be
6969
7070 $this->controller(\App\Controllers\ForumController::class);
7171
72- **execute($method) **
72+ **execute(string $method, ...$params ) **
7373
74- Executes the specified method within the controller. The only parameter is the name of the method to run::
74+ Executes the specified method within the controller. The first parameter is the name of the method to run::
7575
7676 $results = $this->controller(\App\Controllers\ForumController::class)
7777 ->execute('showCategories');
7878
79+ By specifying the second and subsequent parameters, you can pass them to the controller method.
80+
7981This returns a new helper class that provides a number of routines for checking the response itself. See below
8082for details.
8183
@@ -133,7 +135,7 @@ Allows you to provide a **Logger** instance::
133135If you do not provide one, a new Logger instance with the default configuration values will be passed
134136into your controller.
135137
136- **withURI($uri) **
138+ **withURI(string $uri) **
137139
138140Allows you to provide a new URI that simulates the URL the client was visiting when this controller was run.
139141This is helpful if you need to check URI segments within your controller. The only parameter is a string
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ Checking Response Status
3737**isOK() **
3838
3939Returns a boolean true/false based on whether the response is perceived to be "ok". This is primarily determined by
40- a response status code in the 200 or 300's.
40+ a response status code in the 200 or 300's. An empty body is not considered valid, unless in redirects.
4141::
4242
4343 if ($result->isOK()) {
You can’t perform that action at this time.
0 commit comments