Esempio n. 1
0
 /**
  * @param Application $app
  */
 public function boot(Application $app)
 {
     $config = $app['config'];
     if ($config->getDbType() === 'MEMORY') {
         $app['store'] = new Memory();
     } else {
         $factory = new RDBMSStoreFactory($config->getDbHost(), $config->getDbName(), $config->getDbUser(), $config->getDbPassword());
         $app['store'] = $factory->create();
     }
 }
 /**
  * @expectedException \Ace\Repository\Store\UnavailableException
  */
 public function testCreateFailsForInvalidDsn()
 {
     $factory = new RDBMSStoreFactory('invalid', 'no-db', 'user', 'pass', 'dir');
     $factory->create();
 }