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
69
69
70
70
$this->controller(\App\Controllers\ForumController::class);
71
71
72
- **execute($method) **
72
+ **execute(string $method, ...$params ) **
73
73
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::
75
75
76
76
$results = $this->controller(\App\Controllers\ForumController::class)
77
77
->execute('showCategories');
78
78
79
+ By specifying the second and subsequent parameters, you can pass them to the controller method.
80
+
79
81
This returns a new helper class that provides a number of routines for checking the response itself. See below
80
82
for details.
81
83
@@ -133,7 +135,7 @@ Allows you to provide a **Logger** instance::
133
135
If you do not provide one, a new Logger instance with the default configuration values will be passed
134
136
into your controller.
135
137
136
- **withURI($uri) **
138
+ **withURI(string $uri) **
137
139
138
140
Allows you to provide a new URI that simulates the URL the client was visiting when this controller was run.
139
141
This 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
37
37
**isOK() **
38
38
39
39
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.
41
41
::
42
42
43
43
if ($result->isOK()) {
You can’t perform that action at this time.
0 commit comments