public function testDrop() { $result = array('dropped' => 'databaseName', 'ok' => 1); $this->mongoDB->expects($this->once())->method('drop')->will($this->returnValue($result)); $db = new Database($this->connection, $this->mongoDB, $this->eventManager); $this->expectEvents(array(array(Events::preDropDatabase, new EventArgs($db)), array(Events::postDropDatabase, new EventArgs($db)))); $this->assertSame($result, $db->drop()); }
protected function tearDown() { $this->oid = array(); if ($this->connection) { $this->connection->close(); $this->connection = null; } if ($this->con) { $this->con->drop(); $this->con = null; } }
/** * @see Database::drop() */ public function drop() { $this->log(['dropDatabase' => true]); return parent::drop(); }
/** @proxy */ public function drop() { $this->log(array('dropDatabase' => true)); return parent::drop(); }