You are here

public function FixedRatesFormTest::setUp in Currency 8.3

Same name in this branch
  1. 8.3 tests/src/Unit/Controller/FixedRatesFormTest.php \Drupal\Tests\currency\Unit\Controller\FixedRatesFormTest::setUp()
  2. 8.3 tests/src/Unit/Form/FixedRatesFormTest.php \Drupal\Tests\currency\Unit\Form\FixedRatesFormTest::setUp()

Overrides UnitTestCase::setUp

File

tests/src/Unit/Form/FixedRatesFormTest.php, line 79

Class

FixedRatesFormTest
@coversDefaultClass \Drupal\currency\Form\FixedRatesForm

Namespace

Drupal\Tests\currency\Unit\Form

Code

public function setUp() : void {
  $this->configFactory = $this
    ->createMock(ConfigFactoryInterface::class);
  $this->currencyExchangeRateProviderManager = $this
    ->createMock(ExchangeRateProviderManagerInterface::class);
  $this->currencyStorage = $this
    ->createMock(EntityStorageInterface::class);
  $this->formHelper = $this
    ->createMock(FormHelperInterface::class);
  $this->stringTranslation = $this
    ->getStringTranslationStub();
  $this->messenger = $this
    ->createMock(MessengerInterface::class);
  $this->sut = new FixedRatesForm($this->configFactory, $this->stringTranslation, $this->currencyStorage, $this->currencyExchangeRateProviderManager, $this->formHelper);
  $this->sut
    ->setMessenger($this->messenger);
}