You are here

protected function USPSUnitTestBase::setConfig in Commerce USPS 8

Mocks the configuration array for tests.

Parameters

array $config: The shipping method plugin configuration.

6 calls to USPSUnitTestBase::setConfig()
USPSInternationalRateRequestTest::setUp in tests/src/Unit/USPSInternationalRateRequestTest.php
USPSInternationalRateRequestTest::testCommercialRates in tests/src/Unit/USPSInternationalRateRequestTest.php
Test getRates() with commercial rate response.
USPSRateRequestTest::setUp in tests/src/Unit/USPSRateRequestTest.php
USPSRateRequestTest::testCommercialRates in tests/src/Unit/USPSRateRequestTest.php
Test getRates() with commercial rate response.
USPSRateRequestTest::testSingleRate in tests/src/Unit/USPSRateRequestTest.php
Tests returning a single rate response.

... See full list

File

tests/src/Unit/USPSUnitTestBase.php, line 59

Class

USPSUnitTestBase
Class USPSUnitTestBase.

Namespace

Drupal\Tests\commerce_usps\Unit

Code

protected function setConfig(array $config = []) {
  $this->configuration = $config + [
    'api_information' => [
      'user_id' => '972BLUEO5743',
      'password' => '972BLUEO5743',
      'mode' => 'live',
    ],
    'rate_options' => [
      'rate_class' => 'retail',
    ],
    'default_package_type' => 'usps_small_flat_rate_box',
  ];
}