Skip to content

Commit

Permalink
Update docs (testing) #128
Browse files Browse the repository at this point in the history
  • Loading branch information
odan committed Apr 6, 2024
1 parent d6b682a commit 160ed2b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,18 @@ $request = $this->createFormRequest('POST', '/users', ['name' => 'Sally']);

### Creating a query string

The [http_build_query](https://www.php.net/manual/en/function.http-build-query.php) can generate
The `withQueryParams` method can generate
URL-encoded query strings. Example:

```php
$params = [
'limit' => 10,
];

$url = sprintf('/users?%s', http_build_query($params));
// $url is now: /users?limit=10
$request = $this->createRequest('GET', '/users');

$request = $this->createRequest('GET', $url);
// /users?limit=10
$request = $request->withQueryParams($params);
```

### Add BasicAuth to the request
Expand Down

0 comments on commit 160ed2b

Please sign in to comment.