Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ parameters:
count: 1
path: src/Browser/BrowserKitBrowser.php

-
message: "#^Method Zenstruck\\\\Browser\\\\BrowserKitBrowser\\:\\:patch\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#"
count: 1
path: src/Browser/BrowserKitBrowser.php

-
message: "#^Method Zenstruck\\\\Browser\\\\BrowserKitBrowser\\:\\:post\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#"
count: 1
Expand Down
12 changes: 12 additions & 0 deletions src/Browser/BrowserKitBrowser.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,18 @@ final public function delete(string $url, $options = []): self
return $this->request('DELETE', $url, $options);
}

/**
* @see request()
*
* @param HttpOptions|array $options
*
* @return static
*/
final public function patch(string $url, $options = []): self
{
return $this->request('PATCH', $url, $options);
}

/**
* @return static
*/
Expand Down
3 changes: 3 additions & 0 deletions tests/BrowserKitBrowserTests.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ public function http_method_actions(): void
->post('/http-method')
->assertSuccessful()
->assertContains('"method":"POST"')
->patch('/http-method')
->assertSuccessful()
->assertContains('"method":"PATCH"')
->delete('/http-method')
->assertSuccessful()
->assertContains('"method":"DELETE"')
Expand Down