Code Duplication    Length = 19-19 lines in 2 locations

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

@@ 106-124 (lines=19) @@
103
    /**
104
     * @depends testCreateDatabase
105
     */
106
    public function testGetAllDocsFormDatabase()
107
    {
108
        $db = new HTTP\SocketClient();
109
        $db->request( 'PUT', '/' . $this->getTestDatabase() . '/123', '{"_id":"123","data":"Foo"}' );
110
111
        $response = $db->request( 'GET', '/' . $this->getTestDatabase() . '/_all_docs' );
112
113
        $this->assertInstanceOf('Doctrine\CouchDB\HTTP\Response', $response);
114
115
        $this->assertSame(
116
            1,
117
            $response->body['total_rows']
118
        );
119
120
        $this->assertSame(
121
            '123',
122
            $response->body['rows'][0]['id']
123
        );
124
    }
125
126
    /**
127
     * @depends testCreateDatabase

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

@@ 121-139 (lines=19) @@
118
    /**
119
     * @depends testCreateDatabase
120
     */
121
    public function testGetAllDocsFormDatabase()
122
    {
123
        $db = new HTTP\StreamClient();
124
        $db->request( 'PUT', '/' . $this->getTestDatabase() . '/123', '{"_id":"123","data":"Foo"}' );
125
126
        $response = $db->request( 'GET', '/' . $this->getTestDatabase() . '/_all_docs' );
127
128
        $this->assertInstanceOf('Doctrine\CouchDB\HTTP\Response', $response);
129
130
        $this->assertSame(
131
            1,
132
            $response->body['total_rows']
133
        );
134
135
        $this->assertSame(
136
            '123',
137
            $response->body['rows'][0]['id']
138
        );
139
    }
140
141
    /**
142
     * @depends testCreateDatabase