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 UnitTestCase::setUp

File

tests/src/Unit/Plugin/Payment/LineItem/BasicTest.php, line 42

Class

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

Namespace

Drupal\Tests\payment\Unit\Plugin\Payment\LineItem

Code

public function setUp() : void {
  $this->database = $this
    ->getMockBuilder(Connection::class)
    ->disableOriginalConstructor()
    ->getMock();
  $this->stringTranslation = $this
    ->getStringTranslationStub();
  $configuration = [];
  $plugin_id = $this
    ->randomMachineName();
  $plugin_definition = [];
  $this->sut = new Basic($configuration, $plugin_id, $plugin_definition, $this->stringTranslation, $this->database);
}