public function CurrencyFormTest::setUp in Currency 8.3
Overrides UnitTestCase::setUp
File
- tests/
src/ Unit/ Entity/ Currency/ CurrencyFormTest.php, line 77
Class
- CurrencyFormTest
- @coversDefaultClass \Drupal\currency\Entity\Currency\CurrencyForm
Namespace
Drupal\Tests\currency\Unit\Entity\CurrencyCode
public function setUp() : void {
$this->currency = $this
->createMock(CurrencyInterface::class);
$this->currencyStorage = $this
->createMock(EntityStorageInterface::class);
$this->linkGenerator = $this
->createMock(LinkGeneratorInterface::class);
$this->inputParser = $this
->createMock(InputInterface::class);
$this->stringTranslation = $this
->getStringTranslationStub();
$this->messenger = $this
->createMock(MessengerInterface::class);
$this->sut = new CurrencyForm($this->stringTranslation, $this->linkGenerator, $this->currencyStorage, $this->inputParser);
$this->sut
->setEntity($this->currency);
$this->sut
->setMessenger($this->messenger);
}