public function PaymentStatusFormTest::setUp in Payment 8.2
Same name in this branch
- 8.2 tests/src/Unit/Entity/PaymentStatus/PaymentStatusFormTest.php \Drupal\Tests\payment\Unit\Entity\PaymentStatus\PaymentStatusFormTest::setUp()
- 8.2 tests/src/Unit/Entity/Payment/PaymentStatusFormTest.php \Drupal\Tests\payment\Unit\Entity\Payment\PaymentStatusFormTest::setUp()
Overrides UnitTestCase::setUp
File
- tests/
src/ Unit/ Entity/ Payment/ PaymentStatusFormTest.php, line 131
Class
- PaymentStatusFormTest
- @coversDefaultClass \Drupal\payment\Entity\Payment\PaymentStatusForm
Namespace
Drupal\Tests\payment\Unit\Entity\PaymentCode
public function setUp() : void {
$this->currentUser = $this
->createMock(AccountInterface::class);
$this->paymentStatusManager = $this
->createMock(PaymentStatusManagerInterface::class);
$this->pluginSelector = $this
->createMock(PluginSelectorInterface::class);
$this->pluginSelectorManager = $this
->createMock(PluginSelectorManagerInterface::class);
$this->stringTranslation = $this
->getStringTranslationStub();
$this->paymentStatusPluginType = $this
->prophesize(PluginTypeInterface::class);
$this->urlGenerator = $this
->createMock(UrlGeneratorInterface::class);
$this->payment = $this
->createMock(PaymentInterface::class);
$this->entityRepository = $this
->createMock(EntityRepositoryInterface::class);
$this->entityTypeBundleInfo = $this
->prophesize(EntityTypeBundleInfoInterface::class)
->reveal();
$this->time = $this
->prophesize(TimeInterface::class)
->reveal();
$this->formDisplay = $this
->prophesize(EntityFormDisplayInterface::class)
->reveal();
$this->sut = new PaymentStatusForm($this->entityRepository, $this->entityTypeBundleInfo, $this->time);
$this->sut
->setStringTranslation($this->stringTranslation);
$this->sut
->setEntity($this->payment);
$this->sut
->setPaymentStatusPluginType($this->paymentStatusPluginType
->reveal());
$this->sut
->setPluginSelectorManager($this->pluginSelectorManager);
$this->sut
->setCurrentUser($this->currentUser);
}