Code Duplication    Length = 14-14 lines in 2 locations

tests/Unit/Client/ProductClientTest.php 1 location

@@ 291-304 (lines=14) @@
288
        );
289
    }
290
291
    private function getIzettleGetMock($url, $data): IzettleClientInterface
292
    {
293
        $responseMock = Mockery::mock(ResponseInterface::class);
294
295
        $izettleClientMock = Mockery::mock(IzettleClientInterface::class);
296
        $izettleClientMock
297
            ->shouldReceive('get')
298
            ->once()
299
            ->with($url)
300
            ->andReturn($responseMock);
301
        $izettleClientMock->shouldReceive('getJson')->once()->andReturn(json_encode($data));
302
303
        return $izettleClientMock;
304
    }
305
306
    private function getIzettlePostMock($url, $postData): IzettleClientInterface
307
    {

tests/Unit/Client/PurchaseClientTest.php 1 location

@@ 63-76 (lines=14) @@
60
        $purchaseClient->getPurchase($purchaseUuid);
61
    }
62
63
    private function getIzettleMock($url, $data): IzettleClientInterface
64
    {
65
        $responseMock = Mockery::mock(ResponseInterface::class);
66
67
        $izettleClientMock = Mockery::mock(IzettleClientInterface::class);
68
        $izettleClientMock
69
            ->shouldReceive('get')
70
            ->once()
71
            ->with($url)
72
            ->andReturn($responseMock);
73
        $izettleClientMock->shouldReceive('getJson')->once()->andReturn(json_encode($data));
74
75
        return $izettleClientMock;
76
    }
77
78
    private function getPurchaseHistoryObject(): PurchaseHistory
79
    {