You are here

public function USPSRateRequestTest::setUp in Commerce USPS 8

Overrides USPSUnitTestBase::setUp

File

tests/src/Unit/USPSRateRequestTest.php, line 22

Class

USPSRateRequestTest
Class USPSRateRequestTest.

Namespace

Drupal\Tests\commerce_usps\Unit

Code

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

  // Add the services to the config.
  $this
    ->setConfig([
    'services' => [
      1,
      2,
      3,
      4,
      6,
      7,
    ],
  ]);

  // Mock all the objects and set the config.
  $event_dispatcher = new EventDispatcher();
  $this->uspsShipment = new USPSShipment($event_dispatcher);
  $this->rateRequest = new USPSRateRequest($this->uspsShipment, $event_dispatcher);
  $this->rateRequest
    ->setConfig($this
    ->getConfig());
}