Doctrine\Tests\ODM\CouchDB\TestUtil::getTestDatabase PHP Method

getTestDatabase() public static method

public static getTestDatabase ( )
    public static function getTestDatabase()
    {
        if (isset($GLOBALS['DOCTRINE_COUCHDB_DATABASE'])) {
            return $GLOBALS['DOCTRINE_COUCHDB_DATABASE'];
        }
        return 'doctrine_test_database';
    }

Usage Example

Exemplo n.º 1
0
 /**
  * @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));
 }
All Usage Examples Of Doctrine\Tests\ODM\CouchDB\TestUtil::getTestDatabase