public function PaymentReferenceTest::setUp in Payment 8.2
Same name in this branch
- 8.2 modules/payment_reference/tests/src/Unit/Element/PaymentReferenceTest.php \Drupal\Tests\payment_reference\Unit\Element\PaymentReferenceTest::setUp()
- 8.2 modules/payment_reference/tests/src/Unit/Plugin/Payment/Type/PaymentReferenceTest.php \Drupal\Tests\payment_reference\Unit\Plugin\Payment\Type\PaymentReferenceTest::setUp()
- 8.2 modules/payment_reference/tests/src/Unit/Plugin/Field/FieldWidget/PaymentReferenceTest.php \Drupal\Tests\payment_reference\Unit\Plugin\Field\FieldWidget\PaymentReferenceTest::setUp()
- 8.2 modules/payment_reference/tests/src/Unit/Plugin/Field/FieldType/PaymentReferenceTest.php \Drupal\Tests\payment_reference\Unit\Plugin\Field\FieldType\PaymentReferenceTest::setUp()
Overrides UnitTestCase::setUp
File
- modules/
payment_reference/ tests/ src/ Unit/ Element/ PaymentReferenceTest.php, line 124
Class
- PaymentReferenceTest
- @coversDefaultClass \Drupal\payment_reference\Element\PaymentReference
Namespace
Drupal\Tests\payment_reference\Unit\ElementCode
public function setUp() : void {
$this->currentUser = $this
->createMock(AccountInterface::class);
$this->dateFormatter = $this
->getMockBuilder(DateFormatter::class)
->disableOriginalConstructor()
->getMock();
$this->linkGenerator = $this
->createMock(LinkGeneratorInterface::class);
$this->paymentMethodManager = $this
->createMock(PaymentMethodManagerInterface::class);
$this->stringTranslation = $this
->getStringTranslationStub();
$this->paymentMethodType = $this
->prophesize(PluginTypeInterface::class);
$this->paymentQueue = $this
->createMock(QueueInterface::class);
$this->paymentStorage = $this
->createMock(EntityStorageInterface::class);
$this->pluginSelectorManager = $this
->createMock(PluginSelectorManagerInterface::class);
$this->renderer = $this
->createMock(RendererInterface::class);
$this->requestStack = $this
->getMockBuilder(RequestStack::class)
->disableOriginalConstructor()
->getMock();
$this->urlGenerator = $this
->createMock(UrlGeneratorInterface::class);
$configuration = [];
$plugin_id = $this
->randomMachineName();
$plugin_definition = [];
$this->sut = new PaymentReference($configuration, $plugin_id, $plugin_definition, $this->requestStack, $this->paymentStorage, $this->stringTranslation, $this->dateFormatter, $this->linkGenerator, $this->renderer, $this->currentUser, $this->pluginSelectorManager, $this->paymentMethodType
->reveal(), new Random(), $this->paymentQueue);
}