Code Duplication    Length = 18-18 lines in 2 locations

tests/Doctrine/Tests/ODM/CouchDB/HTTP/SocketClientTest.php 1 location

@@ 129-146 (lines=18) @@
126
    /**
127
     * @depends testCreateDatabase
128
     */
129
    public function testGetSingleDocumentFromDatabase()
130
    {
131
        $db = new HTTP\SocketClient();
132
        $db->request( 'PUT', '/' . $this->getTestDatabase() . '/123', '{"_id":"123","data":"Foo"}' );
133
134
        $response = $db->request( 'GET', '/' . $this->getTestDatabase() . '/123' );
135
136
        $this->assertInstanceOf('Doctrine\CouchDB\HTTP\Response', $response);
137
138
        $this->assertSame(
139
            '123',
140
            $response->body['_id']
141
        );
142
143
        $this->assertArrayHasKey('_id', $response->body);
144
145
        $this->assertArrayNotHasKey('unknownProperty', $response->body);
146
    }
147
148
    /**
149
     * @depends testCreateDatabase

tests/Doctrine/Tests/ODM/CouchDB/HTTP/StreamClientTest.php 1 location

@@ 144-161 (lines=18) @@
141
    /**
142
     * @depends testCreateDatabase
143
     */
144
    public function testGetSingleDocumentFromDatabase()
145
    {
146
        $db = new HTTP\StreamClient();
147
        $db->request( 'PUT', '/' . $this->getTestDatabase() . '/123', '{"_id":"123","data":"Foo"}' );
148
149
        $response = $db->request( 'GET', '/' . $this->getTestDatabase() . '/123' );
150
151
        $this->assertInstanceOf('Doctrine\CouchDB\HTTP\Response', $response);
152
153
        $this->assertSame(
154
            '123',
155
            $response->body['_id']
156
        );
157
158
        $this->assertArrayHasKey('_id', $response->body);
159
160
        $this->assertArrayNotHasKey('unknownProperty', $response->body);
161
    }
162
163
    /**
164
     * @depends testCreateDatabase