protected 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/ Plugin/ Field/ FieldWidget/ PaymentReferenceTest.php, line 70
Class
- PaymentReferenceTest
- @coversDefaultClass \Drupal\payment_reference\Plugin\Field\FieldWidget\PaymentReference
Namespace
Drupal\Tests\payment_reference\Unit\Plugin\Field\FieldWidgetCode
protected function setUp() : void {
$this->fieldDefinition = $this
->createMock(FieldDefinitionInterface::class);
$this->configFactoryConfiguration = array(
'payment_reference.payment_type' => array(
'limit_allowed_plugins' => TRUE,
'allowed_plugin_ids' => array(
$this
->randomMachineName(),
),
'plugin_selector_id' => $this
->randomMachineName(),
),
);
$this->configFactory = $this
->getConfigFactoryStub($this->configFactoryConfiguration);
$this->currentUser = $this
->createMock(AccountInterface::class);
$this->paymentFactory = $this
->createMock(PaymentFactoryInterface::class);
$this->sut = new PaymentReference($this
->randomMachineName(), [], $this->fieldDefinition, [], [], $this->configFactory, $this->currentUser, $this->paymentFactory);
}