Code Duplication    Length = 19-19 lines in 2 locations

tests/JsonTest.php 2 locations

@@ 84-102 (lines=19) @@
81
    /**
82
     * @test
83
     */
84
    public function canMakeGetRequestsWithAuthentication()
85
    {
86
        $this->setClient(['authToken' => 'myToken']);
87
88
        $query = ['foo' => 'bar'];
89
90
        $this->mockClient()->request(
91
            'GET',
92
            $this->url('/foo'),
93
            [
94
                'auth'  => ['myToken', ''],
95
                'query' => $query,
96
            ]
97
        )->willReturn($this->fooBarResponse());
98
99
        $data = $this->client->get('/foo', $query);
100
101
        $this->assertFooBarResponse($data);
102
    }
103
104
    /**
105
     * @test
@@ 107-125 (lines=19) @@
104
    /**
105
     * @test
106
     */
107
    public function canMakeGetRequestsWithBasicAuthentication()
108
    {
109
        $this->setClient(['basicAuth' => ['username', 'password']]);
110
111
        $query = ['foo' => 'bar'];
112
113
        $this->mockClient()->request(
114
            'GET',
115
            $this->url('/foo'),
116
            [
117
                'auth'  => ['username', 'password'],
118
                'query' => $query,
119
            ]
120
        )->willReturn($this->fooBarResponse());
121
122
        $data = $this->client->get('/foo', $query);
123
124
        $this->assertFooBarResponse($data);
125
    }
126
127
    /**
128
     * @test