Skip to content

Commit 93f6ff9

Browse files
authored
Merge pull request #5339 from kenjis/fix-docs-testing-controllers
docs: fix testing controllers
2 parents 5569e23 + 2d86740 commit 93f6ff9

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

user_guide_src/source/testing/controllers.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff 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+
7981
This returns a new helper class that provides a number of routines for checking the response itself. See below
8082
for details.
8183

@@ -133,7 +135,7 @@ Allows you to provide a **Logger** instance::
133135
If you do not provide one, a new Logger instance with the default configuration values will be passed
134136
into your controller.
135137

136-
**withURI($uri)**
138+
**withURI(string $uri)**
137139

138140
Allows you to provide a new URI that simulates the URL the client was visiting when this controller was run.
139141
This is helpful if you need to check URI segments within your controller. The only parameter is a string

user_guide_src/source/testing/response.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Checking Response Status
3737
**isOK()**
3838

3939
Returns 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()) {

0 commit comments

Comments
 (0)