Code Duplication    Length = 16-17 lines in 2 locations

Tests/Message/CreateClassifierRequestTest.php 1 location

@@ 28-44 (lines=17) @@
25
    /**
26
     * Create a mock Guzzle Client with example response
27
     */
28
    public function setUp()
29
    {
30
        parent::setUp();
31
32
        $request = $this->getMockHttpResponse('CreateClassifierSuccess.txt');
33
        $httpClient = $this->getMockHttpClientWithHistoryAndResponses($this->container, [$request]);
34
35
        $this->request = new CreateClassifierRequest($httpClient);
36
37
        $this->request->initialize(
38
            [
39
                'positive_examples' => 'Tests/images/butterfly-positive.zip',
40
                'negative_examples' => 'Tests/images/butterfly-negative.zip',
41
                'name' => 'butterfly'
42
            ]
43
        );
44
    }
45
46
    /**
47
     * Check for expected data

Tests/Message/ClassifyRequestTest.php 1 location

@@ 29-44 (lines=16) @@
26
    /**
27
     * Create a mock Guzzle Client with example response
28
     */
29
    public function setUp()
30
    {
31
        parent::setUp();
32
33
        $request = $this->getMockHttpResponse('ClassifySuccess.txt');
34
        $httpClient = $this->getMockHttpClientWithHistoryAndResponses($this->container, [$request]);
35
36
        $this->request = new ClassifyRequest($httpClient);
37
38
        $this->request->initialize(
39
            [
40
                'images_file' => 'Tests/images/hummingbird-1047836_640.jpg',
41
                'classifier_ids' => [1, 2, 3],
42
            ]
43
        );
44
    }
45
46
    /**
47
     * Check for expected image and classifier IDs