You are here

public function BasicTest::setUp in Payment 8.2

Same name in this branch
  1. 8.2 tests/src/Unit/Plugin/Payment/MethodConfiguration/BasicTest.php \Drupal\Tests\payment\Unit\Plugin\Payment\MethodConfiguration\BasicTest::setUp()
  2. 8.2 tests/src/Unit/Plugin/Payment/Method/BasicTest.php \Drupal\Tests\payment\Unit\Plugin\Payment\Method\BasicTest::setUp()
  3. 8.2 tests/src/Unit/Plugin/Payment/LineItem/BasicTest.php \Drupal\Tests\payment\Unit\Plugin\Payment\LineItem\BasicTest::setUp()

Overrides PaymentMethodBaseTestBase::setUp

File

tests/src/Unit/Plugin/Payment/Method/BasicTest.php, line 44

Class

BasicTest
@coversDefaultClass \Drupal\payment\Plugin\Payment\Method\Basic

Namespace

Drupal\Tests\payment\Unit\Plugin\Payment\Method

Code

public function setUp() : void {
  parent::setUp();
  $this->pluginDefinition += array(
    'entity_id' => $this
      ->randomMachineName(),
    'execute_status_id' => $this
      ->randomMachineName(),
    'capture' => TRUE,
    'capture_status_id' => $this
      ->randomMachineName(),
    'refund' => TRUE,
    'refund_status_id' => $this
      ->randomMachineName(),
  );
  $this->moduleHandler = $this
    ->createMock(ModuleHandlerInterface::class);
  $this->paymentStatusManager = $this
    ->createMock(PaymentStatusManagerInterface::class);
  $this->sut = new Basic([], '', $this->pluginDefinition, $this->moduleHandler, $this->eventDispatcher, $this->token, $this->paymentStatusManager);
}