public function PluginBasedExchangeRateProviderFormTest::setUp in Currency 8.3
Same name in this branch
- 8.3 tests/src/Unit/Controller/PluginBasedExchangeRateProviderFormTest.php \Drupal\Tests\currency\Unit\Controller\PluginBasedExchangeRateProviderFormTest::setUp()
- 8.3 tests/src/Unit/Form/PluginBasedExchangeRateProviderFormTest.php \Drupal\Tests\currency\Unit\Form\PluginBasedExchangeRateProviderFormTest::setUp()
Overrides UnitTestCase::setUp
File
- tests/
src/ Unit/ Controller/ PluginBasedExchangeRateProviderFormTest.php, line 58
Class
- PluginBasedExchangeRateProviderFormTest
- @coversDefaultClass \Drupal\currency\Form\PluginBasedExchangeRateProviderForm
Namespace
Drupal\Tests\currency\Unit\ControllerCode
public function setUp() : void {
$this->currencyExchangeRateProviderManager = $this
->createMock(ExchangeRateProviderManagerInterface::class);
$this->exchangeRateProvider = $this
->getMockBuilder(PluginBasedExchangeRateProvider::class)
->disableOriginalConstructor()
->getMock();
$this->stringTranslation = $this
->getStringTranslationStub();
$this->messenger = $this
->createMock(MessengerInterface::class);
$this->sut = new PluginBasedExchangeRateProviderForm($this->stringTranslation, $this->exchangeRateProvider, $this->currencyExchangeRateProviderManager);
$this->sut
->setMessenger($this->messenger);
}