You are here

public function CurrencyAmountTest::setUp in Currency 8.3

Overrides UnitTestCase::setUp

File

tests/src/Unit/Element/CurrencyAmountTest.php, line 60

Class

CurrencyAmountTest
@coversDefaultClass \Drupal\currency\Element\CurrencyAmount

Namespace

Drupal\Tests\currency\Unit\Element

Code

public function setUp() : void {
  $this->currencyStorage = $this
    ->createMock(EntityStorageInterface::class);
  $this->formHelper = $this
    ->createMock(FormHelperInterface::class);
  $this->input = $this
    ->createMock(InputInterface::class);
  $this->stringTranslation = $this
    ->getStringTranslationStub();
  $configuration = [];
  $plugin_id = $this
    ->randomMachineName();
  $plugin_definition = [];
  $this->sut = new CurrencyAmount($configuration, $plugin_id, $plugin_definition, $this->stringTranslation, $this->currencyStorage, $this->input, $this->formHelper);
}