public function setUp() { parent::setUp(); // Need page_title_block because we test page titles $this->drupalPlaceBlock('page_title_block'); $this->drupalLogin($this->adminUser); }
/** * {@inheritdoc} */ protected function setUp() { parent::setUp(); // Create a simple customer user account. $this->customer = $this->drupalCreateUser(); // Ensure test mails are logged. \Drupal::configFactory()->getEditable('system.mail')->set('interface.uc_order', 'test_mail_collector')->save(); }
public function setUp() { parent::setUp(); // Need page_title_block because we test page titles $this->drupalPlaceBlock('page_title_block'); // Create a simple customer user account. $this->customer = $this->drupalCreateUser(array('view own orders')); }
public function setUp() { parent::setUp(); // Need page_title_block because we test page titles $this->drupalPlaceBlock('page_title_block'); // Ensure test mails are logged. \Drupal::configFactory()->getEditable('system.mail')->set('interface.uc_stock', 'test_mail_collector')->save(); $this->drupalLogin($this->adminUser); }
public function setUp() { parent::setUp(); // Create a random address object for use in tests. $this->test_address[] = $this->createAddress(); // Create a specific address object for use in tests. $settings = array('first_name' => 'Elmo', 'last_name' => 'Monster', 'company' => 'CTW, Inc.', 'street1' => '123 Sesame Street', 'street2' => '', 'city' => 'New York', 'zone' => 'NY', 'country' => 'US', 'postal_code' => '10010', 'phone' => '1234567890', 'email' => '*****@*****.**'); $this->test_address[] = $this->createAddress($settings); }
/** * {@inheritdoc} */ protected function setUp() { parent::setUp(); // Need admin permissions in order to change credit card settings. $this->drupalLogin($this->adminUser); // Configure and enable Credit card module and Test gateway. $this->configureCreditCard(); $this->configureGateway(); }
public function setUp() { parent::setUp(); $this->drupalLogin($this->adminUser); // In order to test zone-based conditions, this particular test class // assumes that US is enabled as default, and CA is also enabled. \Drupal\uc_country\Entity\Country::load('US')->enable()->save(); \Drupal\uc_country\Entity\Country::load('CA')->enable()->save(); \Drupal::configFactory()->getEditable('uc_store.settings')->set('address.country', 'US')->save(); }
/** * {@inheritdoc} */ protected function setUp() { parent::setUp(); // Log in and add a product to the cart for testing. $this->drupalLogin($this->adminUser); $this->addToCart($this->product); // Disable address panes during checkout. $edit = array('panes[delivery][status]' => FALSE, 'panes[billing][status]' => FALSE); $this->drupalPostForm('admin/store/config/checkout', $edit, t('Save configuration')); }
/** * {@inheritdoc} */ protected function setUp() { parent::setUp(); $this->drupalLogin($this->adminUser); // module_load_include() has to be called after parent::setUp() // because the moduler_handler service isn't initialized yet. module_load_include('inc', 'uc_store', 'includes/uc_ajax_attach'); // In order to test zone-based conditions, this particular test class // assumes that US is enabled and set as the store country. Country::load('US')->enable()->save(); \Drupal::configFactory()->getEditable('uc_store.settings')->set('address.country', 'US')->save(); }
/** * {@inheritdoc} */ protected function setUp() { parent::setUp(); // Need admin permissions in order to change file download settings. $this->drupalLogin($this->adminUser); // Set up directory for files to live in. $this->configureDownloadDirectory(); // Load one test file so we always have something to download. // Use the Ubercart README.txt because we know it will always be there // and we know in advance how big it is. $filename = drupal_get_path('module', 'uc_file') . '/../README.txt'; $this->setTestFile($filename); }
/** * {@inheritdoc} */ protected function setUp() { parent::setUp(); // Create a simple customer user account. $this->cartManager = \Drupal::service('uc_cart.manager'); $this->cart = $this->cartManager->get(); // Create a simple customer user account. $this->customer = $this->drupalCreateUser(); // Create a payment method. $this->createPaymentMethod('check'); // Ensure test mails are logged. \Drupal::configFactory()->getEditable('system.mail')->set('interface.uc_order', 'test_mail_collector')->save(); }
/** * {@inheritdoc} */ protected function setUp() { parent::setUp(); // Set front page so we have someplace to redirect to for invalid Cart Links. \Drupal::configFactory()->getEditable('system.site')->set('page.front', '/node')->save(); // Need page_title_block because we test page titles $this->drupalPlaceBlock('page_title_block'); // System help block is needed to see output from hook_help(). $this->drupalPlaceBlock('help_block', array('region' => 'help')); // Testing profile doesn't include a 'page' content type. // We will need this to create pages with links on them. $this->drupalCreateContentType(array('type' => 'page', 'name' => 'Basic page')); // Create Full HTML text format, needed because we want links // to appear on pages. $full_html_format = FilterFormat::create(array('format' => 'full_html', 'name' => 'Full HTML')); $full_html_format->save(); }
/** * {@inheritdoc} */ protected function setUp() { parent::setUp(); // Need page_title_block because we test page titles $this->drupalPlaceBlock('page_title_block'); }
/** * {@inheritdoc} */ protected function setUp() { parent::setUp(); $this->drupalLogin($this->adminUser); $this->addToCart($this->product); }
/** * {@inheritdoc} */ protected function setUp() { parent::setUp(); $this->drupalLogin($this->adminUser); }
public function setUp() { parent::setUp(); $this->drupalLogin($this->adminUser); }
public function setUp() { parent::setUp(); $this->block = $this->drupalPlaceBlock('uc_cart'); }
/** * {@inheritdoc} */ protected function setUp() { parent::setUp(); $this->drupalPlaceBlock('system_breadcrumb_block'); }
/** * {@inheritdoc} */ protected function setUp() { parent::setUp(); $this->adminUser = $this->drupalCreateUser(array('access user profiles', 'view customers')); $this->customer = $this->drupalCreateUser(); }