You are here

protected function FulfillmentTestBase::setUp in Ubercart 8.4

Overrides UbercartBrowserTestBase::setUp

1 call to FulfillmentTestBase::setUp()
FulfillmentRulesEventsTest::setUp in shipping/uc_fulfillment/tests/src/Functional/FulfillmentRulesEventsTest.php
1 method overrides FulfillmentTestBase::setUp()
FulfillmentRulesEventsTest::setUp in shipping/uc_fulfillment/tests/src/Functional/FulfillmentRulesEventsTest.php

File

shipping/uc_fulfillment/tests/src/Functional/FulfillmentTestBase.php, line 31

Class

FulfillmentTestBase
Base class for fulfillment backend functionality tests.

Namespace

Drupal\Tests\uc_fulfillment\Functional

Code

protected function setUp() {
  parent::setUp();

  // Ensure test mails are logged.
  \Drupal::configFactory()
    ->getEditable('system.mail')
    ->set('interface.uc_order', 'test_mail_collector')
    ->save();

  // Set the default ship-from country to be the same as the store country
  // that was determined in parent::setUp().
  $store_country = \Drupal::configFactory()
    ->get('uc_store.settings')
    ->get('address.country');
  \Drupal::configFactory()
    ->getEditable('uc_quote.settings')
    ->set('ship_from_address.country', $store_country)
    ->save();
}