/** * @return FactoryInterface */ private function getDatabase() { if ($this->database) { return $this->database; } $config = $this->config->getDatabaseConfig(); $db_adapter_factory = new DbAdapterFactory(); $this->database = $db_adapter_factory->getAdapter($config); return $this->database; }
/** * @covers ::getAdapter * @covers ::<private> */ public function testAdapterForTestingTypeIsATestingFactory() { $this->assertInstanceOf('\\Hodor\\Database\\Adapter\\Testing\\Factory', $this->adapter_factory->getAdapter(['type' => 'testing'])); }