Exemplo n.º 1
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();
 }
Exemplo n.º 2
0
 /**
  * Set up test case, fix demo data where needed
  */
 public function setUp()
 {
     parent::setUp();
     // insert test order
     $sql = "\n              INSERT INTO `s_order_basket` (`sessionID`, `userID`, `articlename`, `articleID`, `ordernumber`, `shippingfree`, `quantity`, `price`, `netprice`, `tax_rate`, `datum`, `modus`, `esdarticle`, `partnerID`, `lastviewport`, `useragent`, `config`, `currencyFactor`) VALUES\n                (:firstSession, 0, 'Sonnenbrille Red', 170, 'SW10170', 0, 4, 39.95, 33.571428571429, 19, '2101-09-11 11:49:54', 0, 0, '', 'index', 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20100101 Firefox/22.0 FirePHP/0.7.2', '', 1),\n                (:firstSession, 0, 'Fliegenklatsche grün', 98, 'SW10101', 0, 1, 0.79, 0.66386554621849, 19, '2101-09-11 11:50:02', 0, 0, '', 'index', 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20100101 Firefox/22.0 FirePHP/0.7.2', '', 1),\n                (:firstSession, 0, 'Bumerang', 245, 'SW10236', 0, 1, 20, 16.806722689076, 19, '2101-09-11 11:50:13', 0, 0, '', 'index', 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20100101 Firefox/22.0 FirePHP/0.7.2', '', 1),\n                (:secondSession, 0, 'Dartscheibe Circle', 240, 'SW10231', 0, 1, 49.99, 42.008403361345, 19, '2101-09-11 11:50:17', 0, 0, '', '', '', '', 1),\n                (:secondSession, 0, 'Dartpfeil Steel Atomic', 241, 'SW10232', 0, 1, 14.99, 12.596638655462, 19, '2101-09-11 11:50:20', 0, 0, '', '', '', '', 1),\n                (:firstSession, 0, 'Dart Automat Standgerät', 239, 'SW10230', 0, 1, 2499, 2100, 19, '2101-09-10 11:50:22', 0, 0, '', 'index', 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20100101 Firefox/22.0 FirePHP/0.7.2', '', 1),\n                (:firstSession, 0, 'Warenkorbrabatt', 0, 'SHIPPINGDISCOUNT', 0, 1, -2, -1.68, 19, '2101-09-10 11:50:22', 4, 0, '', 'index', 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20100101 Firefox/22.0 FirePHP/0.7.2', '', 1);\n        ";
     Shopware()->Db()->query($sql, array("firstSession" => self::FIRST_DUMMY_SESSION_ID, "secondSession" => self::SECOND_DUMMY_SESSION_ID));
 }
Exemplo n.º 3
0
 /**
  * Set up test case, fix demo data where needed
  */
 public function setUp()
 {
     parent::setUp();
     // Add price group
     $sql = "\n        UPDATE s_articles SET pricegroupActive = 1 WHERE id = 2;\n        INSERT INTO s_core_pricegroups_discounts (`groupID`, `customergroupID`, `discount`, `discountstart`) VALUES (1, 1, 5, 1);\n        ";
     Shopware()->Db()->query($sql);
 }
Exemplo n.º 4
0
 /**
  * Set up test case, fix demo data where needed
  */
 public function setUp()
 {
     parent::setUp();
     // fix broken variant basePrice articles
     $sql = "\n            UPDATE `s_articles_details` SET unitID = 1,\n            purchaseunit =  REPLACE(REPLACE(`additionaltext`, ',', '.'), ' Liter', '')\n            WHERE articleID IN  (7, 122, 2, 5);\n\n            DELETE FROM s_articles_attributes WHERE articleID IS NULL;\n\n            INSERT IGNORE INTO s_articles_attributes (`articleID`, `articledetailsID`) VALUES\n            (2, 123), (2, 124), (2, 125),\n            (5, 252), (5, 253), (5, 254), (5, 255),\n            (7,249), (7,250), (7, 251),\n            (122, 256), (122, 257), (122, 258), (122, 259);\n        ";
     Shopware()->Db()->query($sql);
 }
Exemplo n.º 5
0
 /**
  * Test set up method
  */
 public function setUp()
 {
     parent::setUp();
     $this->plugin = Shopware()->Plugins()->Frontend()->Statistics();
     $sql = "INSERT IGNORE INTO `s_emarketing_partner` (`idcode`, `datum`, `company`, `contact`, `street`, `streetnumber`, `zipcode`, `city`, `phone`, `fax`, `country`, `email`, `web`, `profil`, `fix`, `percent`, `cookielifetime`, `active`, `userID`) VALUES\n                  ('test123', '0000-00-00', 'Partner', '', '', '', '', '', '', '', '', '', '', '', 0, 10, 3600, 1, NULL)";
     Shopware()->Db()->query($sql);
 }
Exemplo n.º 6
0
 /**
  * Set up test case, fix demo data where needed
  */
 public function setUp()
 {
     parent::setUp();
     //set Category "Tees und Zubehör" to inactive so the childs should not be displayed
     $sql = "UPDATE `s_categories` SET `active` = '0' WHERE `id` =11";
     Shopware()->Db()->exec($sql);
 }
Exemplo n.º 7
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();
 }
 /**
  * Set up test case, fix demo data where needed
  */
 public function setUp()
 {
     parent::setUp();
     $sql = "UPDATE `s_articles_details` SET `kind` = '1' WHERE `ordernumber` = 'SW10002.1'";
     Shopware()->Db()->query($sql);
     $sql = "UPDATE `s_articles_details` SET `kind` = '2' WHERE `ordernumber` = 'SW10002.3'";
     Shopware()->Db()->query($sql);
 }
 /**
  * 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();
 }
Exemplo n.º 10
0
 /**
  * Set up test case, fix demo data where needed
  */
 public function setUp()
 {
     parent::setUp();
     // Get a copy of article descriptions
     $ids = implode(", ", array_keys($this->articlesToTest));
     $sql = "SELECT `id`, `description_long`, `description` FROM s_articles WHERE `id` IN ({$ids})";
     $this->backup = Shopware()->Db()->fetchAssoc($sql);
     // Update article description, set UTF-8 string
     $sql = "UPDATE s_articles SET `description_long`= ?, `description` = ? WHERE `id` IN ({$ids})";
     Shopware()->Db()->query($sql, array($this->longDescription, $this->shortDescription));
 }
Exemplo n.º 11
0
 /**
  * Test set up method
  */
 public function setUp()
 {
     parent::setUp();
     $this->plugin = Shopware()->Plugins()->Frontend()->Google();
 }
 /**
  * Test set up method
  */
 public function setUp()
 {
     parent::setUp();
     $this->module = Shopware()->Modules()->Articles();
 }
Exemplo n.º 13
0
 /**
  * Set up test case, fix demo data where needed
  */
 public function setUp()
 {
     parent::setUp();
     $sql = "UPDATE `s_blog` SET `active` = '0' WHERE `id` =3;";
     Shopware()->Db()->exec($sql, array());
 }
Exemplo n.º 14
0
 public function setUp()
 {
     parent::setUp();
 }
Exemplo n.º 15
0
 public function setUp()
 {
     $this->resource = new \Shopware\Components\Api\Resource\Article();
     $this->resource->setManager(Shopware()->Models());
     parent::setUp();
 }