You are here

public function AmountFormattingFormTest::setUp in Currency 8.3

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

Overrides UnitTestCase::setUp

File

tests/src/Unit/Form/AmountFormattingFormTest.php, line 62

Class

AmountFormattingFormTest
@coversDefaultClass \Drupal\currency\Form\AmountFormattingForm

Namespace

Drupal\Tests\currency\Unit\Form

Code

public function setUp() : void {
  $this->configFactory = $this
    ->createMock(ConfigFactoryInterface::class);
  $this->currencyAmountFormatterManager = $this
    ->createMock(AmountFormatterManagerInterface::class);
  $this->stringTranslation = $this
    ->getStringTranslationStub();
  $this->messenger = $this
    ->createMock(MessengerInterface::class);
  $this->controller = new AmountFormattingForm($this->configFactory, $this->stringTranslation, $this->currencyAmountFormatterManager);
  $this->controller
    ->setMessenger($this->messenger);
}