Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2241ae0

Browse filesBrowse files
authored
fix(test): Add Throwable type to ClientFake response annotations (#576)
* Add Throwable type to ClientFake response annotations * Remove redundant "composer refactor" command from CONTRIBUTING.md * Add missing status code in the README.md Testing section
1 parent 3356a26 commit 2241ae0
Copy full SHA for 2241ae0

File tree

Expand file treeCollapse file tree

3 files changed

+3
-15
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+3
-15
lines changed

‎CONTRIBUTING.md

Copy file name to clipboardExpand all lines: CONTRIBUTING.md
-12Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,6 @@ Clone your fork, then install the dev dependencies:
2424
composer install
2525
```
2626

27-
## Refactor
28-
29-
Refactor your code:
30-
```bash
31-
composer refactor
32-
```
33-
3427
## Lint
3528

3629
Lint your code:
@@ -45,11 +38,6 @@ Run all tests:
4538
composer test
4639
```
4740

48-
Check code quality:
49-
```bash
50-
composer test:refactor
51-
```
52-
5341
Check types:
5442
```bash
5543
composer test:types

‎README.md

Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2419,7 +2419,7 @@ $client = new ClientFake([
24192419
'message' => 'The model `gpt-1` does not exist',
24202420
'type' => 'invalid_request_error',
24212421
'code' => null,
2422-
])
2422+
], 404)
24232423
]);
24242424

24252425
// the `ErrorException` will be thrown

‎src/Testing/ClientFake.php

Copy file name to clipboardExpand all lines: src/Testing/ClientFake.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ class ClientFake implements ClientContract
3434
private array $requests = [];
3535

3636
/**
37-
* @param array<array-key, ResponseContract|StreamResponse|string> $responses
37+
* @param array<array-key, ResponseContract|StreamResponse|Throwable|string> $responses
3838
*/
3939
public function __construct(protected array $responses = []) {}
4040

4141
/**
42-
* @param array<array-key, ResponseContract|StreamResponse|string> $responses
42+
* @param array<array-key, ResponseContract|StreamResponse|Throwable|string> $responses
4343
*/
4444
public function addResponses(array $responses): void
4545
{

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.