Esempio n. 1
0
 /**
  * @return TestDbAcle;
  */
 public static function create(\Pdo $pdo, $factoryOverrides = array(), $factories = null)
 {
     if (is_null($factories)) {
         $factories = new Config\DefaultFactories();
     }
     $testDbAcle = new TestDbAcle();
     $serviceLocator = new ServiceLocator($factories->getFactories($pdo->getAttribute(\PDO::ATTR_DRIVER_NAME)));
     $serviceLocator->addFactories($factoryOverrides);
     $serviceLocator->setService('pdo', $pdo);
     $testDbAcle->setServiceLocator($serviceLocator);
     return $testDbAcle;
 }