You are here

protected function CountryToCodeTest::setUp in Tamper 8

Overrides TamperPluginTestBase::setUp

File

tests/src/Unit/Plugin/Tamper/CountryToCodeTest.php, line 33

Class

CountryToCodeTest
Tests the country to code plugin.

Namespace

Drupal\Tests\tamper\Unit\Plugin\Tamper

Code

protected function setUp() {

  // Mock up Country Manager.
  $this->countryManagerMock = $this
    ->createMock(CountryManagerInterface::class);
  $this->countryManagerMock
    ->expects($this
    ->any())
    ->method('getList')
    ->will($this
    ->returnValue([
    'AG' => 'Antigua and Barbuda',
    'CA' => 'Canada',
    'US' => 'United States of America',
  ]));
  parent::setUp();
  $this->plugin
    ->setCountryManager($this->countryManagerMock);
}