public function PaymentListBuilderTest::setUp in Payment 8.2
Overrides UnitTestCase::setUp
File
- tests/
src/ Unit/ Entity/ Payment/ PaymentListBuilderTest.php, line 87
Class
- PaymentListBuilderTest
- @coversDefaultClass \Drupal\payment\Entity\Payment\PaymentListBuilder
Namespace
Drupal\Tests\payment\Unit\Entity\PaymentCode
public function setUp() : void {
$this->currencyStorage = $this
->createMock(EntityStorageInterface::class);
$this->dateFormatter = $this
->getMockBuilder(DateFormatter::class)
->disableOriginalConstructor()
->getMock();
$this->entityStorage = $this
->createMock(EntityStorageInterface::class);
$this->entityType = $this
->createMock(EntityTypeInterface::class);
$this->moduleHandler = $this
->createMock(ModuleHandlerInterface::class);
$this->redirectDestination = $this
->createMock(RedirectDestinationInterface::class);
$this->stringTranslation = $this
->getStringTranslationStub();
$this->sut = new PaymentListBuilder($this->entityType, $this->entityStorage);
$this->sut
->setStringTranslation($this->stringTranslation);
$this->sut
->setRedirectDestination($this->redirectDestination);
$this->sut
->setModuleHandler($this->moduleHandler);
$this->sut
->setDateFormatter($this->dateFormatter);
$this->sut
->setCurrencyStorage($this->currencyStorage);
}