/** * Tears down the fixture, for example, closes a network connection. * This method is called after a test is executed. */ protected function tearDown() { $adapter = $this->container->get('db'); $tableManagerMysql = new TableManagerMysql($adapter); $tableManagerMysql->deleteTable('messages_test'); $tableManagerMysql->deleteTable('promises_test'); }
/** * Tears down the fixture, for example, closes a network connection. * This method is called after a test is executed. */ protected function tearDown() { $adapter = $this->container->get('db'); $tableManagerMysql = new TableManagerMysql($adapter); $tableManagerMysql->deleteTable($this->object->getStore()->getTable()); $tableManagerMysql->deleteTable($this->object->getQueue()->getStore()->getTable()); }
/** * Tears down the fixture, for example, closes a network connection. * This method is called after a test is executed. */ protected function tearDown() { $adapter = $this->container->get('db'); $tableManagerMysql = new TableManagerMysql($adapter); $tableManagerMysql->deleteTable($this->store->getTable()); $tableManagerMysql->deleteTable($this->store->getMessagesStore()->getTable()); $tableManagerMysql->deleteTable($this->store->getPromisesStore()->getTable()); }
public function uninstall() { if (getenv('APP_ENV') !== 'dev') { echo 'getenv("APP_ENV") !== "dev" It has did nothing'; exit; } $tableManager = new TableManager($this->dbAdapter); $tableManager->deleteTable(Store::IMAGE_TABLE_NAME); $tableManager->deleteTable(Store::CATEGORY_PRODUCT_TABLE_NAME); $tableManager->deleteTable(Store::PRODUCT_TABLE_NAME); $tableManager->deleteTable(Store::CATEGORY_TABLE_NAME); }
public function uninstall() { if (getenv('APP_ENV') !== 'dev') { echo 'getenv("APP_ENV") !== "dev" It has did nothing'; exit; } $tableManager = new TableManager($this->dbAdapter); $tableManager->deleteTable(StoreCatalog::PROP_LINKED_URL_TABLE_NAME); $tableManager->deleteTable(StoreCatalog::PROP_PRODUCT_CATEGORY_TABLE_NAME); $tableManager->deleteTable(StoreCatalog::PROP_TAG_TABLE_NAME); $tableManager->deleteTable(StoreCatalog::MAIN_SPECIFIC_TABLE_NAME); $tableManager->deleteTable(StoreCatalog::MAINICON_TABLE_NAME); $tableManager->deleteTable(StoreCatalog::PRODUCT_TABLE_NAME); $tableManager->deleteTable(StoreCatalog::CATEGORY_TABLE_NAME); $tableManager->deleteTable(StoreCatalog::TAG_TABLE_NAME); $tableManager->deleteTable(SysEntities::TABLE_NAME); }
public function testStoreFactory__invoke__TableNameFromConfig() { global $testCase; $testCase = 'table_for_test'; $this->container = (include './config/container.php'); $this->object = new StoreFactory(); $this->tableManagerMysql = $this->container->get(TableManagerMysql::KEY_IN_CONFIG); // if tables is absent $this->tableName = StoreFactory::TABLE_NAME . '_test'; $this->tableManagerMysql->deleteTable($this->tableName); $this->assertFalse($this->tableManagerMysql->hasTable($this->tableName)); /* @var $store Store */ $store = $this->container->get(StoreFactory::KEY); $this->assertInstanceOf(Store::class, $store); // if tables is present $this->assertTrue($this->tableManagerMysql->hasTable($this->tableName)); $store = $this->container->get(StoreFactory::KEY); $this->assertInstanceOf(Store::class, $store); $this->tableManagerMysql->deleteTable($this->tableName); $testCase = 'default'; }
/** * Tears down the fixture, for example, closes a network connection. * This method is called after a test is executed. */ protected function tearDown() { $adapter = $this->container->get('db'); $tableManagerMysql = new TableManagerMysql($adapter); $tableManagerMysql->deleteTable($this->tableName); }