You are here

function CurrencyTest::setUp in Currency 8.3

Same name in this branch
  1. 8.3 tests/src/Unit/Entity/CurrencyTest.php \Drupal\Tests\currency\Unit\Entity\CurrencyTest::setUp()
  2. 8.3 tests/src/Unit/Plugin/views/filter/CurrencyTest.php \Drupal\Tests\currency\Unit\Plugin\views\filter\CurrencyTest::setUp()
  3. 8.3 tests/src/Unit/Plugin/views/field/CurrencyTest.php \Drupal\Tests\currency\Unit\Plugin\views\field\CurrencyTest::setUp()

Overrides UnitTestCase::setUp

File

tests/src/Unit/Entity/CurrencyTest.php, line 51

Class

CurrencyTest
@coversDefaultClass \Drupal\currency\Entity\Currency

Namespace

Drupal\Tests\currency\Unit\Entity

Code

function setUp() : void {
  $this->entityTypeId = $this
    ->randomMachineName();
  $this->currencyAmountFormatterManager = $this
    ->createMock(AmountFormatterManagerInterface::class);
  $this->entityTypeManager = $this
    ->createMock(EntityTypeManagerInterface::class);
  $this->sut = new Currency([], $this->entityTypeId);
  $this->sut
    ->setCurrencyAmountFormatterManager($this->currencyAmountFormatterManager);
  $this->sut
    ->setEntityTypeManager($this->entityTypeManager);
}