Skip to content

Commit 2ebf001

Browse files
committed
Revert "FEATURE: Added testcase for mixed cassettes"
This reverts commit ce1471b.
1 parent 9672154 commit 2ebf001

File tree

1 file changed

+5
-36
lines changed

1 file changed

+5
-36
lines changed

tests/Unit/CassetteTest.php

Lines changed: 5 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ public function testHasResponseFound(): void
7070
public function testPlaybackOfIdenticalRequestsFromLegacyCassette(): void
7171
{
7272
$request1 = new Request('GET', 'https://example.com');
73-
$response1 = new Response('200', [], 'response1');
73+
$response1 = new Response(200, [], 'response1');
7474

7575
$request2 = new Request('GET', 'https://example.com');
76-
$response2 = new Response('200', [], 'response2');
76+
$response2 = new Response(200, [], 'response2');
7777

7878
// These are legacy recordings with no index keys.
7979
$recordings = [
@@ -94,48 +94,17 @@ public function testPlaybackOfIdenticalRequestsFromLegacyCassette(): void
9494
}
9595

9696
/**
97-
* Ensure also mixed cassettes are working properly, if a legacy cassette has a first entry without index (should be
98-
* 0) and a second entry for the same request with incremented index (should be 1).
99-
*/
100-
public function testPlaybackOfIdenticalRequestsFromLegacyCassetteWithIndexedRecords(): void
101-
{
102-
$request1 = new Request('GET', 'https://example.com');
103-
$response1 = new Response('200', [], 'response1');
104-
105-
$request2 = new Request('GET', 'https://example.com');
106-
$response2 = new Response('200', [], 'response2');
107-
108-
// These are legacy recordings with no index keys.
109-
$recordings = [
110-
[
111-
'request' => $request1->toArray(),
112-
'response' => $response1->toArray(),
113-
],
114-
[
115-
'request' => $request2->toArray(),
116-
'response' => $response2->toArray(),
117-
'index' => 1,
118-
],
119-
];
120-
121-
$cassette = $this->createCassetteWithRecordings($recordings);
122-
123-
$this->assertEquals($response1->toArray(), $cassette->playback($request1, 0)->toArray());
124-
$this->assertEquals($response2->toArray(), $cassette->playback($request2, 1)->toArray());
125-
}
126-
127-
/**
128-
* Ensure that if a second identical request is played back from a cassette
97+
* Ensure that if a second identical request is played back from an cassette
12998
* with indexed recordings, the response corresponding to the recording
13099
* index will be returned.
131100
*/
132101
public function testPlaybackOfIdenticalRequests(): void
133102
{
134103
$request1 = new Request('GET', 'https://example.com');
135-
$response1 = new Response('200', [], 'response1');
104+
$response1 = new Response(200, [], 'response1');
136105

137106
$request2 = new Request('GET', 'https://example.com');
138-
$response2 = new Response('200', [], 'response2');
107+
$response2 = new Response(200, [], 'response2');
139108

140109
// These are recordings with index keys which support playback of
141110
// multiple identical requests.

0 commit comments

Comments
 (0)