/**
  * 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();
 }
 /**
  * Performs operation returned by getSetUpOperation().
  */
 protected function tearDown()
 {
     parent::tearDown();
     $filePath = $this->getLogFilePath();
     if (is_file($filePath)) {
         unlink($filePath);
     }
 }
Пример #3
0
 /**
  * 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);
 }
Пример #4
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();
 }
Пример #5
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();
 }
Пример #6
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();
 }
Пример #7
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');
 }
Пример #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();
     $this->repository = new Repository(Shopware()->Models()->getConnection(), Shopware()->Events());
     $this->orderNumber = uniqid('SW');
     $this->articleId = 0;
     $this->userId = 0;
 }
Пример #9
0
 /**
  * Cleaning up testData
  */
 protected function tearDown()
 {
     parent::tearDown();
     $sql = "DELETE FROM`s_order_documents` WHERE `docID` IN (20001,20002);";
     Shopware()->Db()->query($sql, array());
 }
 public function setUp()
 {
     parent::setUp();
     Shopware()->Plugins()->Backend()->Auth()->setNoAuth();
     Shopware()->Plugins()->Backend()->Auth()->setNoAcl();
 }
Пример #11
0
 /**
  * Tests set up method
  */
 public function setUp()
 {
     parent::setUp();
     $app = Enlight_Application::Instance();
     $app->Bootstrap()->loadResource('Plugins');
 }
Пример #12
0
 /**
  * Cleaning up testData
  */
 protected function tearDown()
 {
     parent::tearDown();
     // delete price group
     $sql = "\r\n        UPDATE s_articles SET pricegroupActive = 0, pricegroupID = 0 WHERE id = 202;\r\n        DELETE FROM s_core_pricegroups_discounts WHERE `customergroupID` = 1 AND groupID = 1;\r\n        ";
     Shopware()->Db()->query($sql);
     //reset the stapping prices for the main variant
     $sql = "DELETE FROM`s_articles_prices` WHERE `articleID` = 202 AND articledetailsID = ?";
     Shopware()->Db()->query($sql, array(self::MAIN_VARIANT_ID));
     $sql = "REPLACE INTO `s_articles_prices` (`pricegroup`, `from`, `to`, `articleID`, `articledetailsID`, `price`, `pseudoprice`, `baseprice`, `percent`) VALUES\r\n        ('EK', 1, 'beliebig', 202, ?, 17.638655462185, 0, 0, '0.00')";
     Shopware()->Db()->query($sql, array(self::MAIN_VARIANT_ID));
     //reset the stapping prices for the variant
     $sql = "DELETE FROM`s_articles_prices` WHERE `articleID` = 202 AND articledetailsID = ?";
     Shopware()->Db()->query($sql, array(self::VARIANT_ID));
     $sql = "REPLACE INTO `s_articles_prices` (`pricegroup`, `from`, `to`, `articleID`, `articledetailsID`, `price`, `pseudoprice`, `baseprice`, `percent`) VALUES\r\n        ('EK', 1, 'beliebig', 202, ?, 17.638655462185, 0, 0, '0.00')";
     Shopware()->Db()->query($sql, array(self::VARIANT_ID));
 }
Пример #13
0
 /**
  * Cleaning up testData
  */
 protected function tearDown()
 {
     parent::tearDown();
     $sql = "\n            DELETE FROM `s_order` WHERE `id` = :orderId;\n            DELETE FROM `s_order_details` WHERE `orderID` = :orderId;\n        ";
     Shopware()->Db()->query($sql, array("orderId" => self::ORDER_ID));
 }
Пример #14
0
 public function tearDown()
 {
     parent::tearDown();
     $sql = "\r\n            DELETE FROM s_core_shops WHERE id IN (10, 11);\r\n        ";
     Shopware()->Db()->exec($sql);
 }
Пример #15
0
 /**
  * Cleaning up testData
  */
 protected function tearDown()
 {
     parent::tearDown();
     $sql = "DELETE FROM s_articles_notification WHERE id IN (1111111111, 1111111112, 1111111113)";
     Shopware()->Db()->query($sql);
 }
Пример #16
0
 /**
  * revert the test values
  */
 public function tearDown()
 {
     parent::tearDown();
     $sql = "UPDATE `s_articles_details` SET `width` = NULL, `height` = NULL, `length` = NULL  WHERE `ordernumber` = :orderNumber";
     Shopware()->Db()->query($sql, array("orderNumber" => self::ARTICLE_DETAIL_ORDER_NUMBER));
 }
Пример #17
0
 /**
  * Cleaning up testData
  */
 protected function tearDown()
 {
     parent::tearDown();
     $sql = "\n            DELETE FROM `s_order_documents` WHERE `orderID` = :orderID;\n        ";
     Shopware()->Db()->query($sql, array('orderID' => $this->orderId));
 }
Пример #18
0
 public function setUp()
 {
     parent::setUp();
     $this->dispatch('/');
 }
Пример #19
0
 /**
  * Cleaning up testData
  */
 protected function tearDown()
 {
     parent::tearDown();
     $sql = "UPDATE `s_core_customergroups` SET `taxinput` = '1' WHERE`groupkey` = 'EK'";
     Shopware()->Db()->query($sql);
 }