Skip to content

Commit 6aac494

Browse files
committed
Fixed comments
1 parent 72e70cf commit 6aac494

File tree

7 files changed

+22
-22
lines changed

7 files changed

+22
-22
lines changed

tests/Feature/MockRequestTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@
100100
$requestC = new DifferentServiceUserRequest;
101101

102102
$mockClient = new MockClient([
103-
'saloon-test.samcarre.dev/api/user' => $responseA, // ApiResponse Exact Route
104-
'saloon-test.samcarre.dev/*' => $responseB, // ApiResponse Wildcard Routes
105-
'google.com/*' => $responseC, // ApiResponse Different Route,
103+
'saloon-test.samcarre.dev/api/user' => $responseA, // Test Exact Route
104+
'saloon-test.samcarre.dev/*' => $responseB, // Test Wildcard Routes
105+
'google.com/*' => $responseC, // Test Different Route,
106106
]);
107107

108108
$responseA = $requestA->send($mockClient);
@@ -134,8 +134,8 @@
134134
$requestC = new DifferentServiceUserRequest;
135135

136136
$mockClient = new MockClient([
137-
'saloon-test.samcarre.dev/api/user' => $responseA, // ApiResponse Exact Route
138-
'saloon-test.samcarre.dev/*' => $responseB, // ApiResponse Wildcard Routes
137+
'saloon-test.samcarre.dev/api/user' => $responseA, // Test Exact Route
138+
'saloon-test.samcarre.dev/*' => $responseB, // Test Wildcard Routes
139139
'*' => $responseC,
140140
]);
141141

tests/Fixtures/Plugins/HasTestHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function bootHasTestHandler(SaloonRequest $request)
2222

2323
return $promise->then(
2424
function (ResponseInterface $response) {
25-
$response = $response->withHeader('X-ApiResponse-Handler', true);
25+
$response = $response->withHeader('X-Test-Handler', true);
2626

2727
if ($this instanceof SaloonConnector) {
2828
$response = $response->withHeader('X-Handler-Added-To', 'connector');

tests/Pest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/*
44
|--------------------------------------------------------------------------
5-
| ApiResponse Case
5+
| Test Case
66
|--------------------------------------------------------------------------
77
|
88
| The closure you provide to your test functions is always bound to a specific PHPUnit test

tests/Unit/HandlerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
$headers = $response->headers();
1111

12-
expect(isset($headers['X-ApiResponse-Handler']))->toBeTrue();
13-
expect($headers['X-ApiResponse-Handler'])->toEqual([1]);
12+
expect(isset($headers['X-Test-Handler']))->toBeTrue();
13+
expect($headers['X-Test-Handler'])->toEqual([1]);
1414
});
1515

1616
test('handlers on the request with the same name will take priority', function () {

tests/Unit/MockClientTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@
6565
$requestC = new DifferentServiceUserRequest;
6666

6767
$mockClient = new MockClient([
68-
'saloon-test.samcarre.dev/api/user' => $responseA, // ApiResponse Exact Route
69-
'saloon-test.samcarre.dev/*' => $responseB, // ApiResponse Wildcard Routes
70-
'google.com/*' => $responseC, // ApiResponse Different Route,
68+
'saloon-test.samcarre.dev/api/user' => $responseA, // Test Exact Route
69+
'saloon-test.samcarre.dev/*' => $responseB, // Test Wildcard Routes
70+
'google.com/*' => $responseC, // Test Different Route,
7171
]);
7272

7373
expect($mockClient->guessNextResponse($requestA))->toEqual($responseA);
@@ -85,8 +85,8 @@
8585
$requestC = new DifferentServiceUserRequest;
8686

8787
$mockClient = new MockClient([
88-
'saloon-test.samcarre.dev/api/user' => $responseA, // ApiResponse Exact Route
89-
'saloon-test.samcarre.dev/*' => $responseB, // ApiResponse Wildcard Routes
88+
'saloon-test.samcarre.dev/api/user' => $responseA, // Test Exact Route
89+
'saloon-test.samcarre.dev/*' => $responseB, // Test Wildcard Routes
9090
'*' => $responseC,
9191
]);
9292

@@ -105,8 +105,8 @@
105105
$requestC = new DifferentServiceUserRequest;
106106

107107
$mockClient = new MockClient([
108-
'saloon-test.samcarre.dev/api/user' => $responseA, // ApiResponse Exact Route
109-
'saloon-test.samcarre.dev/*' => $responseB, // ApiResponse Wildcard Routes
108+
'saloon-test.samcarre.dev/api/user' => $responseA, // Test Exact Route
109+
'saloon-test.samcarre.dev/*' => $responseB, // Test Wildcard Routes
110110
]);
111111

112112
expect($mockClient->guessNextResponse($requestA))->toEqual($responseA);

tests/Unit/Plugins/RequestDataPluginTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
$config = $requestManager->getConfig();
1818

1919
expect($config)->toHaveKey('json');
20-
expect($config['json'])->toHaveKey('foo', 'bar'); // ApiResponse Default
21-
expect($config['json'])->toHaveKey('name', 'Sam'); // ApiResponse Adding Data After
20+
expect($config['json'])->toHaveKey('foo', 'bar'); // Test Default
21+
expect($config['json'])->toHaveKey('name', 'Sam'); // Test Adding Data After
2222
});
2323

2424
test('if setData is used, all other default data wont be included', function () {
@@ -48,8 +48,8 @@
4848
$config = $requestManager->getConfig();
4949

5050
expect($config)->toHaveKey('json');
51-
expect($config['json'])->toHaveKey('connectorId', '1'); // ApiResponse Default
52-
expect($config['json'])->toHaveKey('requestId', '2'); // ApiResponse Default
51+
expect($config['json'])->toHaveKey('connectorId', '1'); // Test Default
52+
expect($config['json'])->toHaveKey('requestId', '2'); // Test Default
5353
});
5454

5555
test('a request can overwrite all jsonBody', function () {

tests/Unit/QueryParameterTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
$config = $requestManager->getConfig();
2020

2121
expect($config)->toHaveKey('query');
22-
expect($config['query'])->toHaveKey('per_page', 100); // ApiResponse Default
23-
expect($config['query'])->toHaveKey('sort', '-created_at'); // ApiResponse Adding Data After
22+
expect($config['query'])->toHaveKey('per_page', 100); // Test Default
23+
expect($config['query'])->toHaveKey('sort', '-created_at'); // Test Adding Data After
2424
});
2525

2626
test('if setQuery is used, all other default query params wont be included', function () {

0 commit comments

Comments
 (0)