Doctrine\Tests\CouchDB\HTTP\StreamClientTestCase::testForErrorOnDatabaseRecreation PHP Method

testForErrorOnDatabaseRecreation() public method

    public function testForErrorOnDatabaseRecreation()
    {
        $db = new HTTP\StreamClient();
        $response = $db->request('PUT', '/' . $this->getTestDatabase() . '');
        $this->assertTrue($response instanceof HTTP\ErrorResponse);
        $this->assertSame(412, $response->status);
        $this->assertSame(array('error' => 'file_exists', 'reason' => 'The database could not be created, the file already exists.'), $response->body);
    }