예제 #1
0
 /**
  * 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);
 }
예제 #2
0
 /**
  * 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));
 }
예제 #3
0
 /**
  * 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);
 }
예제 #4
0
 /**
  * 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();
 }
예제 #5
0
 /**
  * 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();
 }
예제 #7
0
 /**
  * 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);
 }
예제 #10
0
 /**
  * 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);
 }
예제 #11
0
 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();
 }
예제 #13
0
 /**
  * Cleaning up testData
  */
 public function tearDown()
 {
     parent::tearDown();
     $sql = "UPDATE `s_blog` SET `active` = '1' WHERE `id` =3;";
     Shopware()->Db()->exec($sql, array());
 }
예제 #14
0
 public function setUp()
 {
     parent::setUp();
 }
예제 #15
0
 /**
  * tear down the demo data
  */
 protected function tearDown()
 {
     parent::tearDown();
     $sql = "DELETE FROM s_emarketing_partner where idcode = 'test123'";
     Shopware()->Db()->query($sql);
 }
예제 #16
0
 /**
  * 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());
 }
예제 #17
0
 /**
  * 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));
 }
예제 #18
0
 /**
  * Test set up method
  */
 public function setUp()
 {
     parent::setUp();
     $this->plugin = Shopware()->Plugins()->Frontend()->Google();
 }
예제 #19
0
 public function setUp()
 {
     $this->resource = new \Shopware\Components\Api\Resource\Article();
     $this->resource->setManager(Shopware()->Models());
     parent::setUp();
 }