Skip to content

Commit 7bd41a8

Browse files
committed
fix: Missed a spot to use the new Tapper mock Guzzle helper
1 parent be989c2 commit 7bd41a8

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tests/Feature/AbstractRequestTest.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -710,14 +710,13 @@ public function getLogFolder(): string
710710
public function testRequestCanReturnStaticResponseWithoutAffectingDependencyStore(): void
711711
{
712712
$requestWithCustomTapper = new class extends ConcreteRequest {
713-
protected bool $shouldWriteCache = false; // the requests are identical but we want the second to still try to call the network (and fail)
713+
// $requestWithCustomTapper and $requestWithSystemGuzzle are identical, so make sure cache doesn't confuse this test outcome
714+
protected bool $shouldWriteCache = false;
714715
protected function getGuzzleClient(): Client
715716
{
716717
$tapper = new GuzzleTapper();
717718
$tapper->addMatchBody('POST', '/awesome/', 'Static data as documented', 200);
718-
$mockHandler = new MockHandler($tapper->getResponses());
719-
$handlerStack = HandlerStack::create($mockHandler);
720-
return new Client(['handler' => $handlerStack]);
719+
return $tapper->makeMockedGuzzleClient();
721720
}
722721
};
723722
$this->mockGuzzleWithTapper()->addMatchBody('POST', '/awesome/', 'This method is not implemented', 500);

0 commit comments

Comments
 (0)