Fixed
In 2.0.0 we broke existing tests for 2nd party developers when they were using a code fragment below in their tests. In this version this is fixed without introducing any further changes.
public function test(): void
{
$httpFactory = TmsApi::client('default')->buildHttpFactory();
$httpFactory->preventStrayRequests();
$httpFactory->fake([
'*/Token/Generate*' => Http::response([
'msg' => '',
'code' => 0,
'data' => [
'token' => '6d0SoGWwoSkVpXJl',
],
]),
]);
$response = TmsApi::client('default')->run(new Generate(....));
$this->assertEquals('6d0SoGWwoSkVpXJl', $response->json('data.token'));
}