getTestDatabase() public static method

public static getTestDatabase ( )
 /**
  * @depends testCreateDatabase
  */
 public function testArrayResponse()
 {
     $this->db->request('PUT', '/' . $this->getTestDatabase());
     $response = $this->db->request('GET', '/_all_dbs');
     $this->assertTrue($response instanceof HTTP\Response);
     $this->assertTrue(is_array($response->body));
     $this->assertTrue(in_array(\Doctrine\Tests\ODM\CouchDB\TestUtil::getTestDatabase(), $response->body));
 }
 public function getTestDatabase()
 {
     return TestUtil::getTestDatabase();
 }
示例#3
0
 /**
  * @depends testCreateDatabase
  */
 public function testArrayResponse()
 {
     $db = new HTTP\StreamClient();
     try {
         $db->request('PUT', '/' . $this->getTestDatabase() . '');
     } catch (\Exception $e) {
         /* Ignore */
     }
     $response = $db->request('GET', '/_all_dbs');
     $this->assertTrue($response instanceof HTTP\Response);
     $this->assertTrue(is_array($response->body));
     $this->assertTrue(in_array(\Doctrine\Tests\ODM\CouchDB\TestUtil::getTestDatabase(), $response->body));
 }