示例#1
0
 /**
  * {@inheritDoc}
  */
 public function setUp()
 {
     parent::setUp();
     // split as some implementations might not support multiple commands per call!
     $sql = "DROP TABLE IF EXISTS %table.create_update_tests%;";
     ZMRuntime::getDatabase()->executeUpdate($sql);
     $sql = "CREATE TABLE %table.create_update_tests% (\n                  row_id int(11) NOT NULL auto_increment,\n                  name varchar(128) NOT NULL,\n                  class_name varchar(128) NOT NULL,\n                  method_name varchar(128) NOT NULL,\n                  parameter_list varchar(511) NOT NULL DEFAULT '',\n                  PRIMARY KEY (row_id)\n                ) ENGINE=InnoDB;";
     ZMRuntime::getDatabase()->executeUpdate($sql);
 }
 /**
  * Set up.
  */
 public function setUp()
 {
     parent::setUp();
     $adminUserRoleService = $this->get('adminUserRoleService');
     ZMRuntime::getDatabase()->executeUpdate('TRUNCATE TABLE %table.admin_roles%');
     ZMRuntime::getDatabase()->executeUpdate('TRUNCATE TABLE %table.admins_to_roles%');
     $adminUserRoleService->addRole('admin');
     $adminUserRoleService->addRole('helpdesk');
     ZMRuntime::getDatabase()->executeUpdate('INSERT INTO %table.admins_to_roles% VALUES(1, 1)');
     ZMRuntime::getDatabase()->executeUpdate('INSERT INTO %table.admins_to_roles% VALUES(1, 2)');
 }
示例#3
0
 /**
  * {@inheritDoc}
  */
 public function setUp()
 {
     parent::setUp();
     $couponService = $this->get('couponService');
     $this->createdCouponIds = array();
     $this->accountIds = array($this->getAccountId());
     // create one basic test coupon
     $couponCode = $couponService->createCouponCode('*****@*****.**');
     $this->assertNotNull($couponCode);
     $coupon = $couponService->createCoupon($couponCode, 5, Coupon::TYPPE_GV);
     $this->createdCouponIds[] = $coupon->getId();
     $this->testCouponId = $coupon->getId();
 }
 /**
  * {@inheritDoc}
  */
 public function setUp()
 {
     parent::setUp();
     // some vales zencart's order class wants...
     $_SESSION['sendto'] = '1';
     $_SESSION['billto'] = '1';
     $_SESSION['payment'] = 'moneyorder';
     $_SESSION['shipping'] = 'flat';
     $GLOBALS['moneyorder'] = new ZMObject();
     $GLOBALS['moneyorder']->title = 'moneyorder';
     $GLOBALS['moneyorder']->code = 'moneyorder';
     // cart checks for user...
     $account = $this->get('accountService')->getAccountForId(1);
     $this->getRequest()->getSession()->setAccount($account);
     // clear session and database
     $_SESSION['cart']->reset(true);
     $_SESSION['cart']->restore_contents();
     $this->get('settingsService')->set('apps.store.assertZencart', false);
 }
 /**
  * Set up.
  */
 public function setUp()
 {
     parent::setUp();
     // all tests assume this
     Runtime::getSettings()->set('zenmagick.mvc.resultlist.defaultPagination', 10);
 }
示例#6
0
 /**
  * Set up.
  */
 public function setUp()
 {
     parent::setUp();
 }