/**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     $container = static::createClient()->getContainer();
     $container->get('es.manager')->getConnection()->dropAndCreateIndex();
     parent::setUp();
     $this->executeLargeSqlFile(static::getRootDir($container) . '/data/database.sql');
     $this->executeLargeSqlFile(static::getRootDir($container) . '/data/dummyData.sql');
 }
 /**
  * Clear logs before each test.
  */
 public function setUp()
 {
     parent::setUp();
     $this->getServiceContainer()->get('es.manager')->getConnection()->dropAndCreateIndex();
     $this->getConnection()->executeQuery('RESET MASTER');
     /** @var MysqlStorageManager $managerMysql */
     $this->managerMysql = $this->getServiceContainer()->get('ongr_connections.sync.storage_manager.mysql_storage_manager');
     $shops = $this->getServiceContainer()->getParameter('ongr_connections.shops');
     foreach ($shops as $shop) {
         $this->shopIds[] = $shop['shop_id'];
         $this->managerMysql->createStorage($shop['shop_id']);
     }
 }
 /**
  * Setup services for tests.
  */
 protected function setUp()
 {
     parent::setUp();
     $this->storageManager = new MysqlStorageManager($this->getConnection(), self::TABLE_NAME);
     $this->storageManager->setContainer($this->getServiceContainer());
     $this->syncStorage = new SyncStorage($this->storageManager);
     $this->extractor = new PassthroughExtractor();
     $this->extractor->setContainer($this->getServiceContainer());
     $this->extractor->setStorageFacility($this->syncStorage);
     $shops = $this->getServiceContainer()->getParameter('ongr_connections.shops');
     foreach ($shops as $shop) {
         $this->shopIds[] = $shop['shop_id'];
         $this->storageManager->createStorage($shop['shop_id']);
     }
 }
 /**
  * Clear logs before each test.
  */
 public function setUp()
 {
     parent::setUp();
     $this->getConnection()->executeQuery('RESET MASTER');
 }
 /**
  * Set-up services before executing tests.
  */
 protected function setUp()
 {
     parent::setUp();
     $this->service = new MysqlStorageManager($this->getConnection(), self::TABLE_NAME);
     $this->service->setContainer($this->getServiceContainer());
 }
Esempio n. 6
0
 /**
  * Set-up mocks and service before tests.
  */
 protected function setUp()
 {
     $this->storageManager = $this->getMockBuilder('ONGR\\ConnectionsBundle\\Sync\\StorageManager\\StorageManagerInterface')->getMock();
     $this->service = new SyncStorage($this->storageManager);
     parent::setUp();
 }
 /**
  * {@inheritdoc}
  */
 public function setUp()
 {
     parent::setUp();
     $this->setExecuteCommandInstance();
 }