/** * Initialize the fixture. */ protected function setUp() { parent::setUp(); $this->dbObjectBackup = $this->getProtectedClassProperty(oxDb::getInstance(), 'db'); $this->setProtectedClassProperty(oxDb::getInstance(), 'db', null); $this->assertNull($this->getProtectedClassProperty(oxDb::getInstance(), 'db')); }
/** * Fixture setUp. */ protected function setUp() { parent::setUp(); oxRegistry::getSession()->delBasket(); $this->setConfigParam('blPerfNoBasketSaving', false); $this->_createUsers(); }
/** * setup test data */ public function setUp() { parent::setUp(); $oxid = "__test_1"; $themeId = ""; $blockName = "blockname1"; $moduleBlockFileName = "contentfile1"; $this->insertBlock($oxid, $themeId, $blockName, $moduleBlockFileName); $oxid = "__test_2"; $themeId = ""; $blockName = "blockname2"; $moduleBlockFileName = "contentfile_2"; $this->insertBlock($oxid, $themeId, $blockName, $moduleBlockFileName); $oxid = "__test_1_theme_1"; $themeId = "theme_1"; $blockName = "blockname1"; $moduleBlockFileName = "contentfile_1_theme_1"; $this->insertBlock($oxid, $themeId, $blockName, $moduleBlockFileName); $oxid = "__test_2_theme_1"; $themeId = "theme_1"; $blockName = "blockname2"; $moduleBlockFileName = "contentfile_2_theme_1"; $this->insertBlock($oxid, $themeId, $blockName, $moduleBlockFileName); $oxid = "__test_1_theme_2"; $themeId = "theme_2"; $blockName = "blockname1"; $moduleBlockFileName = "contentfile_1_theme_2"; $this->insertBlock($oxid, $themeId, $blockName, $moduleBlockFileName); }
/** * Initialize the fixture. * * @return null */ protected function setUp() { parent::setUp(); $this->_oSearchHandler = oxNew('oxSearch'); $this->tableViewNameGenerator = oxNew('oxTableViewNameGenerator'); $this->getConfig()->setConfigParam('blUseTimeCheck', true); $this->cleanUpTable('oxarticles'); $this->cleanUpTable('oxobject2category'); $this->cleanUpTable('oxcategories'); }
/** * setup test data */ public function setUp() { parent::setUp(); oxDb::getDb()->Execute("insert into oxtplblocks (OXID,OXACTIVE,OXSHOPID,OXTEMPLATE,OXBLOCKNAME,OXPOS,OXFILE,OXMODULE) values (\n 'test_1',\n '1',\n '15',\n 'filename.tpl',\n 'blockname1',\n 1,\n 'contentfile1',\n 'module1'\n )"); oxDb::getDb()->Execute("insert into oxtplblocks (OXID,OXACTIVE,OXSHOPID,OXTEMPLATE,OXBLOCKNAME,OXPOS,OXFILE,OXMODULE) values (\n 'test_2',\n '1',\n '15',\n 'filename.tpl',\n 'blockname2',\n 2,\n 'contentfile2',\n 'module2'\n )"); oxDb::getDb()->Execute("insert into oxtplblocks (OXID,OXACTIVE,OXSHOPID,OXTEMPLATE,OXBLOCKNAME,OXPOS,OXFILE,OXMODULE) values (\n 'test_3',\n '1',\n '15',\n 'filename.tpl',\n 'blockname2',\n 0,\n 'contentfile3',\n 'module2'\n )"); oxDb::getDb()->Execute("insert into oxtplblocks (OXID,OXACTIVE,OXSHOPID,OXTHEME,OXTEMPLATE,OXBLOCKNAME,OXPOS,OXFILE,OXMODULE) values (\n 'test_3_2',\n '1',\n '15',\n 'not_active_theme',\n 'filename.tpl',\n 'blockname2',\n 1,\n 'contentfile2_not_active_theme',\n 'module2'\n )"); oxDb::getDb()->Execute("insert into oxtplblocks (OXID,OXACTIVE,OXSHOPID,OXTHEME,OXTEMPLATE,OXBLOCKNAME,OXPOS,OXFILE,OXMODULE) values (\n 'test_3_3',\n '1',\n '15',\n 'active_theme',\n 'filename.tpl',\n 'blockname2',\n 1,\n 'contentfile2_active_theme',\n 'module2'\n )"); oxDb::getDb()->Execute("insert into oxtplblocks (OXID,OXACTIVE,OXSHOPID,OXTHEME,OXTEMPLATE,OXBLOCKNAME,OXPOS,OXFILE,OXMODULE) values (\n 'test_ap_1',\n '1',\n '15',\n 'active_theme_parent',\n 'filename2.tpl',\n 'blockname_ap_1',\n 1,\n 'contentfile_ap_active_theme',\n 'module2'\n )"); oxDb::getDb()->Execute("insert into oxtplblocks (OXID,OXACTIVE,OXSHOPID,OXTHEME,OXTEMPLATE,OXBLOCKNAME,OXPOS,OXFILE,OXMODULE) values (\n 'test_apat_1',\n '1',\n '15',\n 'active_theme',\n 'filename3.tpl',\n 'blockname_ap_1',\n 1,\n 'contentfile_apat_block1',\n 'module2'\n )"); oxDb::getDb()->Execute("insert into oxtplblocks (OXID,OXACTIVE,OXSHOPID,OXTHEME,OXTEMPLATE,OXBLOCKNAME,OXPOS,OXFILE,OXMODULE) values (\n 'test_apat_2',\n '1',\n '15',\n 'active_theme',\n 'filename3.tpl',\n 'blockname_ap_2',\n 1,\n 'contentfile_apat_block2',\n 'module2'\n )"); oxDb::getDb()->Execute("insert into oxtplblocks (OXID,OXACTIVE,OXSHOPID,OXTHEME,OXTEMPLATE,OXBLOCKNAME,OXPOS,OXFILE,OXMODULE) values (\n 'test_apat_2_parent',\n '1',\n '15',\n 'active_theme_parent',\n 'filename3.tpl',\n 'blockname_ap_2',\n 1,\n 'contentfile_apat_block2_parent',\n 'module2'\n )"); oxDb::getDb()->Execute("insert into oxtplblocks (OXID,OXACTIVE,OXSHOPID,OXTHEME,OXTEMPLATE,OXBLOCKNAME,OXPOS,OXFILE,OXMODULE) values (\n 'test_apat_3_parent',\n '1',\n '15',\n 'active_theme_parent',\n 'filename3.tpl',\n 'blockname_ap_3',\n 1,\n 'contentfile_apat_block3_parent',\n 'module2'\n )"); oxDb::getDb()->Execute("insert into oxtplblocks (OXID,OXACTIVE,OXSHOPID,OXTHEME,OXTEMPLATE,OXBLOCKNAME,OXPOS,OXFILE,OXMODULE) values (\n 'test_apct_1',\n '1',\n '15',\n '',\n 'filename4.tpl',\n 'blockname_ap_1',\n 1,\n 'contentfile_apat_block1_default',\n 'module2'\n )"); oxDb::getDb()->Execute("insert into oxtplblocks (OXID,OXACTIVE,OXSHOPID,OXTHEME,OXTEMPLATE,OXBLOCKNAME,OXPOS,OXFILE,OXMODULE) values (\n 'test_apct_1_parent',\n '1',\n '15',\n 'active_theme',\n 'filename4.tpl',\n 'blockname_ap_1',\n 1,\n 'contentfile_apat_block1_custom',\n 'module2'\n )"); // one non active - to be sure it is not loaded oxDb::getDb()->Execute("insert into oxtplblocks (OXID,OXACTIVE,OXSHOPID,OXTEMPLATE,OXBLOCKNAME,OXPOS,OXFILE,OXMODULE) values (\n 'test_4',\n '0',\n '15',\n 'filename.tpl',\n 'blockname3',\n 3,\n 'contentfile3',\n 'module2'\n )"); }
/** * Set up the test */ public function setUp() { parent::setUp(); $this->database = \oxDb::getDb(); }
/** * Initialize database table before every test */ public function setUp() { /** Set a user-defined error handler in order to handle errors triggered with trigger_error */ $this->errors = array(); set_error_handler(array($this, "errorHandler")); parent::setUp(); $this->initializeDatabase(); // $this->assureTestTableIsEmpty(); }