Code Duplication    Length = 20-20 lines in 2 locations

tests/Unit/ProductClientTest.php 2 locations

@@ 111-130 (lines=20) @@
108
    /**
109
     * @test
110
     */
111
    public function deleteDiscount()
112
    {
113
        $discount = $this->getDiscount();
114
        $method = 'delete';
115
        $url = sprintf(
116
            ProductClient::DELETE_DISCOUNT,
117
            self::DEFAULT_ORGANIZATION_UUID,
118
            (string) $discount->getUuid()
119
        );
120
        $options = [
121
            'headers' => [
122
                'Authorization' => sprintf('Bearer %s', self::ACCESS_TOKEN),
123
            ],
124
        ];
125
126
        $productClient = new ProductClient($this->getGuzzleClient($method, $url, $options), $this->getAccessToken());
127
        $productClient->deleteDiscount($discount);
128
129
        self::assertTrue(true); //-- fix till issue is solved: https://github.com/mockery/mockery/issues/376
130
    }
131
132
    /**
133
     * @test
@@ 209-228 (lines=20) @@
206
    /**
207
     * @test
208
     */
209
    public function deleteProduct()
210
    {
211
        $product = $this->getProduct();
212
        $method = 'delete';
213
        $url = sprintf(
214
            ProductClient::DELETE_PRODUCT,
215
            self::DEFAULT_ORGANIZATION_UUID,
216
            (string) $product->getUuid()
217
        );
218
        $options = [
219
            'headers' => [
220
                'Authorization' => sprintf('Bearer %s', self::ACCESS_TOKEN),
221
            ],
222
        ];
223
224
        $productClient = new ProductClient($this->getGuzzleClient($method, $url, $options), $this->getAccessToken());
225
        $productClient->deleteProduct($product);
226
227
        self::assertTrue(true); //-- fix till issue is solved: https://github.com/mockery/mockery/issues/376
228
    }
229
230
    private function getDiscount(): Discount
231
    {