Doctrine\Tests\CouchDB\HTTP\StreamClientTestCase::testGetAllDocsFormDatabase PHP Метод

testGetAllDocsFormDatabase() публичный Метод

    public function testGetAllDocsFormDatabase()
    {
        $db = new HTTP\StreamClient();
        $db->request('PUT', '/' . $this->getTestDatabase() . '/123', '{"_id":"123","data":"Foo"}');
        $response = $db->request('GET', '/' . $this->getTestDatabase() . '/_all_docs');
        $this->assertTrue($response instanceof HTTP\Response);
        $this->assertSame(1, $response->body['total_rows']);
        $this->assertSame('123', $response->body['rows'][0]['id']);
    }