public function skip() { $this->skipIf(!MongoDb::enabled(), 'MongoDb is not enabled'); $this->skipIf(!CouchDb::enabled(), 'CouchDb is not enabled'); }
public function testRespondsTo() { $couchdb = new CouchDb($this->_testConfig); $this->assertTrue($couchdb->respondsTo('foobarbaz')); $this->assertFalse($couchdb->respondsTo(0)); }
public function testEnabled() { $this->assertEqual(CouchDb::enabled(), true); $this->assertEqual(CouchDb::enabled('arrays'), true); $this->assertEqual(CouchDb::enabled('transactions'), false); $this->assertEqual(CouchDb::enabled('booleans'), true); $this->assertEqual(CouchDb::enabled('relationships'), false); }
public function testDelete() { $couchdb = new CouchDb($this->_testConfig); $this->query->data(array('id' => 12345, 'rev' => '1-1', 'name' => 'Acme Inc')); $expected = true; $result = $couchdb->delete($this->query); $this->assertEqual($expected, $result); $expected = '/posts/12345'; $result = $couchdb->last->request->path; $this->assertEqual($expected, $result); $expected = 'rev=1-1'; $result = $couchdb->last->request->params; $this->assertEqual($expected, $result); }