Example #1
0
 /**
  * @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;
 }
Example #2
0
 /**
  * @covers ::getAdapter
  * @covers ::<private>
  */
 public function testAdapterForTestingTypeIsATestingFactory()
 {
     $this->assertInstanceOf('\\Hodor\\Database\\Adapter\\Testing\\Factory', $this->adapter_factory->getAdapter(['type' => 'testing']));
 }