Code Duplication    Length = 19-19 lines in 3 locations

tests/Unit/ProductClientTest.php 3 locations

@@ 46-64 (lines=19) @@
43
    /**
44
     * @test
45
     */
46
    public function createCategory()
47
    {
48
        $category = Category::new('name');
49
        $method = 'post';
50
        $url = sprintf(ProductClient::POST_CATEGORY, self::DEFAULT_ORGANIZATION_UUID);
51
        $options = [
52
            'headers' => [
53
                'Authorization' => sprintf('Bearer %s', self::ACCESS_TOKEN),
54
                'content-type' => 'application/json',
55
                'Accept' => 'application/json',
56
            ],
57
            'body' => $category->getCreateData(),
58
        ];
59
60
        $productClient = new ProductClient($this->getGuzzleClient($method, $url, $options), $this->getAccessToken());
61
        $productClient->createCategory($category);
62
63
        self::assertTrue(true); //-- fix till issue is solved: https://github.com/mockery/mockery/issues/376
64
    }
65
66
    /**
67
     * @test
@@ 88-106 (lines=19) @@
85
    /**
86
     * @test
87
     */
88
    public function createDiscount()
89
    {
90
        $discount = $this->getDiscount();
91
        $method = 'post';
92
        $url = sprintf(ProductClient::POST_DISCOUNT, self::DEFAULT_ORGANIZATION_UUID);
93
        $options = [
94
            'headers' => [
95
                'Authorization' => sprintf('Bearer %s', self::ACCESS_TOKEN),
96
                'content-type' => 'application/json',
97
                'Accept' => 'application/json',
98
            ],
99
            'body' => $discount->getCreateData(),
100
        ];
101
102
        $productClient = new ProductClient($this->getGuzzleClient($method, $url, $options), $this->getAccessToken());
103
        $productClient->createDiscount($discount);
104
105
        self::assertTrue(true); //-- fix till issue is solved: https://github.com/mockery/mockery/issues/376
106
    }
107
108
    /**
109
     * @test
@@ 186-204 (lines=19) @@
183
    /**
184
     * @test
185
     */
186
    public function createProduct()
187
    {
188
        $product = $this->getProduct();
189
        $method = 'post';
190
        $url = sprintf(ProductClient::POST_PRODUCT, self::DEFAULT_ORGANIZATION_UUID);
191
        $options = [
192
            'headers' => [
193
                'Authorization' => sprintf('Bearer %s', self::ACCESS_TOKEN),
194
                'content-type' => 'application/json',
195
                'Accept' => 'application/json',
196
            ],
197
            'body' => $product->getCreateData(),
198
        ];
199
200
        $productClient = new ProductClient($this->getGuzzleClient($method, $url, $options), $this->getAccessToken());
201
        $productClient->createProduct($product);
202
203
        self::assertTrue(true); //-- fix till issue is solved: https://github.com/mockery/mockery/issues/376
204
    }
205
206
    /**
207
     * @test