/** * Setup a CouchDB HTTP connector * * @return void * @author Christopher Hlubek <*****@*****.**> */ public function setUp() { $this->client = $this->getAccessibleMock('TYPO3\\CouchDB\\Client', array('dummy'), array('http://127.0.0.1:5984')); $this->client->initializeObject(); if ($this->client->databaseExists($this->databaseName)) { $this->client->deleteDatabase($this->databaseName); } $this->client->createDatabase($this->databaseName); $this->client->setDatabaseName($this->databaseName); }
/** * Setup a CouchDB HTTP connector * * @return void * @author Christopher Hlubek <*****@*****.**> */ public function setUp() { $this->client = $this->getAccessibleMock('TYPO3\\CouchDB\\Client', array('dummy'), array('http://127.0.0.1:5984')); try { $this->client->initializeObject(); if ($this->client->databaseExists($this->databaseName)) { $this->client->deleteDatabase($this->databaseName); } } catch (\RuntimeException $e) { $this->markTestSkipped('We skip the test as we can not connect to CouchDB Server'); } $this->client->createDatabase($this->databaseName); $this->client->setDatabaseName($this->databaseName); }