public function test_createDocWithSession() { $db = new Sag($this->couchIP); $db->setDatabase($this->couchDBName); $db->login('admin', 'passwd', Sag::$AUTH_COOKIE); $doc = new StdClass(); $doc->sag = 'for couchdb'; $res = $db->put('sag', $doc); $this->assertTrue($res->body->ok); $del_res = $db->delete('sag', $res->body->rev); $this->assertTrue($del_res->body->ok); }