/** * Cleaning up testData */ protected function tearDown() { parent::tearDown(); //set Category "Tees und Zubehör" to inactive so the childs should not be displayed $sql = "UPDATE `s_categories` SET `active` = '1' WHERE `id` = 11"; Shopware()->Db()->exec($sql); }
/** * Cleaning up testData */ protected function tearDown() { parent::tearDown(); $sql = "UPDATE `s_articles` SET `laststock` = '0' WHERE `id` =?"; Shopware()->Db()->query($sql, array(self::ARTICLE_ID)); Shopware()->Api()->Import()->sDeleteArticle(array("ordernumber" => self::ORDER_NUMBER)); }
/** * Cleaning up testData */ protected function tearDown() { parent::tearDown(); // delete price group $sql = "\n UPDATE s_articles SET pricegroupActive = 0 WHERE id = 2;\n DELETE FROM s_core_pricegroups_discounts WHERE `customergroupID` = 1 AND `discount` = 5;\n "; Shopware()->Db()->query($sql); }
/** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. */ public function setUp() { $this->debug = $this->getMock('Enlight_Extensions_Debug_Bootstrap', null, array('Debug')); $namespace = new Enlight_Plugin_Namespace_Loader('Extensions'); $namespace->registerPlugin($this->debug); parent::setUp(); }
/** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. */ public function setUp() { $this->errorHandler = $this->getMock('Enlight_Extensions_ErrorHandler_Bootstrap', null, array('')); $namespace = new Enlight_Plugin_Namespace_Loader('Extensions'); $namespace->registerPlugin($this->errorHandler); parent::setUp(); }
/** * Test set up method */ public function setUp() { parent::setUp(); /** @var Connection $connection */ $connection = Shopware()->Container()->get('dbal_connection'); $connection->beginTransaction(); $this->plugin = Shopware()->Plugins()->Backend()->SwagImportExport(); }
/** * Cleaning up testData */ protected function tearDown() { parent::tearDown(); // Restore old main detail if (!empty($this->changedDetails)) { $this->_restoreOldMainDetails(); } }
/** * Cleaning up testData */ protected function tearDown() { parent::tearDown(); // // Restore old main detail $sql = "UPDATE `s_articles_details` SET `kind` = '2' WHERE `ordernumber` = 'SW10002.1'"; Shopware()->Db()->query($sql); $sql = "UPDATE `s_articles_details` SET `kind` = '1' WHERE `ordernumber` = 'SW10002.3'"; Shopware()->Db()->query($sql); }
public static function tearDownAfterClass() { parent::tearDownAfterClass(); $manager = Shopware()->Models(); $repository = $manager->getRepository('Shopware\\Models\\Plugin\\Plugin'); /** @var Plugin $plugin */ $plugin = $repository->findOneBy(['name' => 'TestInvalidPlugin']); $manager->remove($plugin); $manager->flush($plugin); }
/** * Cleaning up testData */ protected function tearDown() { parent::tearDown(); // Restore old descriptions $sql = ""; $values = array(); foreach ($this->backup as $key => $fields) { $sql .= "UPDATE s_articles SET `description_long` = ?, `description` = ? WHERE `id` = {$key};"; $values[] = $fields['description_long']; $values[] = $fields['description']; } Shopware()->Db()->query($sql, $values); }
public static function tearDownAfterClass() { Shopware()->Models()->getRepository('\\Shopware\\Models\\Payment\\Payment')->findOneByName('debit')->setActive(self::$debitStatus); $paymentData = Shopware()->Models()->getRepository('\\Shopware\\Models\\Customer\\PaymentData')->findAll(); foreach ($paymentData as $payment) { Shopware()->Models()->remove($payment); } $paymentInstances = Shopware()->Models()->getRepository('\\Shopware\\Models\\Payment\\PaymentInstance')->findAll(); foreach ($paymentInstances as $paymentInstance) { Shopware()->Models()->remove($paymentInstance); } Shopware()->Models()->flush(); parent::tearDownAfterClass(); }
/** * Test set up method */ public function setUp() { parent::setUp(); $this->module = Shopware()->Modules()->Articles(); }
/** * Cleaning up testData */ public function tearDown() { parent::tearDown(); $sql = "UPDATE `s_blog` SET `active` = '1' WHERE `id` =3;"; Shopware()->Db()->exec($sql, array()); }
public function setUp() { parent::setUp(); }
/** * tear down the demo data */ protected function tearDown() { parent::tearDown(); $sql = "DELETE FROM s_emarketing_partner where idcode = 'test123'"; Shopware()->Db()->query($sql); }
/** * Cleaning up testData */ public function tearDown() { parent::tearDown(); $sql = "UPDATE `s_blog` SET `active` = '1' WHERE `id` =3;"; Shopware()->Db()->exec($sql, array()); //activate blog category $sql = "UPDATE `s_categories` SET `active` = '1' WHERE `id` =17"; Shopware()->Db()->exec($sql, array()); }
/** * Cleaning up testData */ protected function tearDown() { parent::tearDown(); $sql = "\n DELETE FROM `s_order_basket` WHERE `sessionID` = :firstSession;\n DELETE FROM `s_order_basket` WHERE `sessionID` = :secondSession;\n "; Shopware()->Db()->query($sql, array("firstSession" => self::FIRST_DUMMY_SESSION_ID, "secondSession" => self::SECOND_DUMMY_SESSION_ID)); }
/** * Test set up method */ public function setUp() { parent::setUp(); $this->plugin = Shopware()->Plugins()->Frontend()->Google(); }
public function setUp() { $this->resource = new \Shopware\Components\Api\Resource\Article(); $this->resource->setManager(Shopware()->Models()); parent::setUp(); }