Inheritance: extends lithium\data\source\Http
コード例 #1
0
ファイル: DocumentSetTest.php プロジェクト: ncud/sagalaya
 public function skip()
 {
     $this->skipIf(!MongoDb::enabled(), 'MongoDb is not enabled');
     $this->skipIf(!CouchDb::enabled(), 'CouchDb is not enabled');
 }
コード例 #2
0
ファイル: CouchDbTest.php プロジェクト: rapzo/lithium
 public function testRespondsTo()
 {
     $couchdb = new CouchDb($this->_testConfig);
     $this->assertTrue($couchdb->respondsTo('foobarbaz'));
     $this->assertFalse($couchdb->respondsTo(0));
 }
コード例 #3
0
ファイル: CouchDbTest.php プロジェクト: WarToaster/HangOn
 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);
 }
コード例 #4
0
 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);
 }