/**
  * Set up test case
  */
 public function setUp()
 {
     parent::setUp();
     $this->orderId = Shopware()->Db()->fetchOne('SELECT id FROM s_order WHERE ordernumber = 20001');
     Shopware()->Plugins()->Backend()->Auth()->setNoAuth();
     Shopware()->Plugins()->Backend()->Auth()->setNoAcl();
 }
 /**
  * Set up test case, add the pricegroup
  */
 public function setUp()
 {
     parent::setUp();
     // Create Pricegroup
     $sql = "\r\n            REPLACE INTO s_core_pricegroups_discounts (`groupID`, `customergroupID`, `discount`, `discountstart`) VALUES\r\n            (1, 1, 5, 1),\r\n            (1, 1, 10, 2),\r\n            (1, 1, 20, 3),\r\n            (1, 1, 25, 4);\r\n        ";
     Shopware()->Db()->query($sql);
 }
 /**
  * Standard set up for every test - just disable auth
  */
 public function setUp()
 {
     parent::setUp();
     // disable auth and acl
     Shopware()->Plugins()->Backend()->Auth()->setNoAuth();
     Shopware()->Plugins()->Backend()->Auth()->setNoAcl();
 }
 /**
  * Tests set up method
  */
 public function setUp()
 {
     parent::setUp();
     Shopware()->Bootstrap()->resetResource('Template');
     $sql = "\r\n            INSERT IGNORE INTO `s_core_shops` (\r\n              `id`, `main_id`, `name`, `title`, `position`,\r\n              `host`, `base_path`, `base_url`, `hosts`,\r\n              `secure`, `secure_host`, `secure_base_path`,\r\n              `template_id`, `document_template_id`, `category_id`,\r\n              `locale_id`, `currency_id`, `customer_group_id`,\r\n              `fallback_id`, `customer_scope`, `default`, `active`\r\n            ) VALUES (\r\n              10, NULL, 'Testshop 2', 'Testshop 2', 0,\r\n              '2test.in', NULL, NULL, '2fr.test.in\\n2nl.test.in\\n',\r\n              0, NULL, NULL,\r\n              11, 11, 11, 2, 1, 1, 2, 0, 0, 1\r\n            ), (\r\n              11, NULL, 'Testshop 1', 'Testshop 1', 0,\r\n              'test.in', NULL, NULL, 'fr.test.in\\nnl.test.in\\n',\r\n              0, NULL, NULL,\r\n              11, 11, 11, 2, 1, 1, 2, 0, 0, 1\r\n            );\r\n        ";
     Shopware()->Db()->exec($sql);
 }
 /**
  * Set up test case, fix demo data where needed
  */
 public function setUp()
 {
     parent::setUp();
     // insert test order
     $sql = "\n              INSERT IGNORE INTO `s_order` (`id`, `ordernumber`, `userID`, `invoice_amount`, `invoice_amount_net`, `invoice_shipping`, `invoice_shipping_net`, `ordertime`, `status`, `cleared`, `paymentID`, `transactionID`, `comment`, `customercomment`, `internalcomment`, `net`, `taxfree`, `partnerID`, `temporaryID`, `referer`, `cleareddate`, `trackingcode`, `language`, `dispatchID`, `currency`, `currencyFactor`, `subshopID`, `remote_addr`) VALUES\n              (:orderId, '29996', 1, 126.82, 106.57, 3.9, 3.28, '2013-07-10 08:17:20', 0, 17, 5, '', '', '', '', 0, 0, '', '', '', NULL, '', '1', 9, 'EUR', 1, 1, '172.16.10.71');\n\n              INSERT IGNORE INTO `s_order_details` (`id`, `orderID`, `ordernumber`, `articleID`, `articleordernumber`, `price`, `quantity`, `name`, `status`, `shipped`, `shippedgroup`, `releasedate`, `modus`, `esdarticle`, `taxID`, `tax_rate`, `config`) VALUES\n              (15315352, :orderId, '20003', 178, 'SW10178', 19.95, 1, 'Strandtuch Ibiza', 0, 0, 0, '0000-00-00', 0, 0, 1, 19, ''),\n              (15315353, :orderId, '20003', 177, 'SW10177', 34.99, 1, 'Strandtuch Stripes für Kinder', 0, 0, 0, '0000-00-00', 0, 0, 1, 19, ''),\n              (15315354, :orderId, '20003', 173, 'SW10173', 39.99, 1, 'Strandkleid Flower Power', 0, 0, 0, '0000-00-00', 0, 0, 1, 19, ''),\n              (15315355, :orderId, '20003', 160, 'SW10160.1', 29.99, 1, 'Sommer Sandale Ocean Blue 36', 0, 0, 0, '0000-00-00', 0, 0, 1, 19, ''),\n              (15315356, :orderId, '20003', 0, 'SHIPPINGDISCOUNT', -2, 1, 'Warenkorbrabatt', 0, 0, 0, '0000-00-00', 4, 0, 0, 19, '');\n        ";
     Shopware()->Db()->query($sql, array("orderId" => self::ORDER_ID));
 }
 /**
  * adds and writes a test file
  */
 public function setUp()
 {
     parent::setUp();
     $loremIpsum = "Lorem ipsum dolor sit amet, consetetur sadipscing elitr,\n        sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.\n        At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus\n        est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy\n        eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam\n        et justo duo dolores et ea rebum. Stet clita kasd gubergren,\n        no sea takimata sanctus est Lorem ipsum dolor sit amet.";
     $filePath = Shopware()->OldPath() . 'files/' . Shopware()->Config()->get('sESDKEY');
     mkdir($filePath, 0777);
     file_put_contents($filePath . '/shopware_packshot_community_edition_72dpi_rgb.png', $loremIpsum);
 }
示例#7
0
 /**
  * Standard set up for every test - just disable auth
  */
 public function setUp()
 {
     parent::setUp();
     $proxy = Enlight_Application::Instance()->Hooks()->getProxy('Shopware_Controllers_Backend_ImportExport');
     $this->controller = new $proxy(new Enlight_Controller_Request_RequestTestCase(), new Enlight_Controller_Response_ResponseTestCase());
     // disable auth and acl
     Shopware()->Plugins()->Backend()->Auth()->setNoAuth();
     Shopware()->Plugins()->Backend()->Auth()->setNoAcl();
 }
示例#8
0
 /**
  * Standard set up for every test - just disable auth
  */
 public function setUp()
 {
     parent::setUp();
     // disable auth and acl
     Shopware()->Plugins()->Backend()->Auth()->setNoAuth();
     Shopware()->Plugins()->Backend()->Auth()->setNoAcl();
     $sql = "INSERT IGNORE INTO `s_articles_notification` (`id`, `ordernumber`, `date`, `mail`, `send`, `language`, `shopLink`) VALUES\n                (1111111111, 'SW2001', '2010-10-04 10:46:56', '*****@*****.**', 0, '1', 'http://example.com/'),\n                (1111111112, 'SW2003', '2010-10-05 10:46:55', '*****@*****.**', 1, '1', 'http://example.com/'),\n                (1111111113, 'SW2001', '2010-10-04 10:46:54', '*****@*****.**', 1, '1', 'http://example.com/');";
     Shopware()->Db()->query($sql);
 }
 /**
  * Set up the order documents
  */
 public function setUp()
 {
     parent::setUp();
     $sql = "INSERT IGNORE INTO `s_order_documents` (`date`, `type`, `userID`, `orderID`, `amount`, `docID`, `hash`) VALUES\n            ('2013-04-26', 1, 2, 15, 998.56, 20001, 'bb4eef5a6d79acb7fab2b9da19b59ce7'),\n            ('2013-04-26', 1, 1, 57, 201.86, 20002, '110068dc105c9651c2cd1f202f0c9be1'),\n            ('2013-04-26', 2, 2, 15, 998.56, 20001, '15d2f8a284a648576608f1f26a54948c'),\n            ('2013-04-26', 2, 1, 57, 201.86, 20002, '9209b7e17b00e02a4be3f4ae17f943c5')";
     Shopware()->Db()->query($sql);
     // disable auth and acl
     Shopware()->Plugins()->Backend()->Auth()->setNoAuth();
     Shopware()->Plugins()->Backend()->Auth()->setNoAcl();
 }
示例#10
0
 /**
  * Standard set up for every test - just disable auth
  */
 public function setUp()
 {
     parent::setUp();
     $this->manager = Shopware()->Models();
     $this->repository = Shopware()->Models()->getRepository('Shopware\\Models\\Customer\\Customer');
     // disable auth and acl
     Shopware()->Plugins()->Backend()->Auth()->setNoAuth();
     Shopware()->Plugins()->Backend()->Auth()->setNoAcl();
 }
示例#11
0
 /**
  * Standard set up for every test - just disable auth
  */
 public function setUp()
 {
     parent::setUp();
     $this->manager = Shopware()->Models();
     $this->repository = Shopware()->Models()->Category();
     // disable auth and acl
     Shopware()->Plugins()->Backend()->Auth()->setNoAuth();
     Shopware()->Plugins()->Backend()->Auth()->setNoAcl();
 }
示例#12
0
 /**
  *
  */
 public function setUp()
 {
     parent::setUp();
     $app = TestHelper::Instance();
     $request = $this->Request();
     $request->setPathInfo(null);
     $this->Front()->setRequest($request);
     //$this->Template()->force_compile = true;
     $this->Template()->addTemplateDir($app->TestPath('DataSets'), 'Ticket5302');
 }
示例#13
0
 /**
  * Standard set up for every test - just disable auth
  */
 public function setUp()
 {
     parent::setUp();
     // disable auth and acl
     Shopware()->Plugins()->Backend()->Auth()->setNoAuth();
     Shopware()->Plugins()->Backend()->Auth()->setNoAcl();
     $this->repository = new Repository(Shopware()->Models()->getConnection(), Shopware()->Events());
     $this->orderNumber = uniqid('SW');
     $this->articleId = 0;
     $this->userId = 0;
 }
示例#14
0
 /**
  * Set up method to set some values to test
  */
 public function setUp()
 {
     parent::setUp();
     $sql = "UPDATE `s_articles_details` SET `width` = '2.010', `height` = '3.020', `length` = '4.330'  WHERE `ordernumber` = :orderNumber";
     Shopware()->Db()->query($sql, array("orderNumber" => self::ARTICLE_DETAIL_ORDER_NUMBER));
 }
 public function setUp()
 {
     parent::setUp();
     Shopware()->Plugins()->Backend()->Auth()->setNoAuth();
     Shopware()->Plugins()->Backend()->Auth()->setNoAcl();
 }
示例#16
0
 /**
  * Tests set up method
  */
 public function setUp()
 {
     parent::setUp();
     $app = Enlight_Application::Instance();
     $app->Bootstrap()->loadResource('Plugins');
 }
示例#17
0
 public function setUp()
 {
     parent::setUp();
     $this->dispatch('/');
 }