You are here

public function PaymentMethodConfigurationTest::setUp in Payment 8.2

@covers ::setEntityTypeManager @covers ::setTypedConfig @covers ::setUserStorage

Overrides UnitTestCase::setUp

File

tests/src/Unit/Entity/PaymentMethodConfigurationTest.php, line 69

Class

PaymentMethodConfigurationTest
@coversDefaultClass \Drupal\payment\Entity\PaymentMethodConfiguration

Namespace

Drupal\Tests\payment\Unit\Entity

Code

public function setUp() : void {
  $this->bundle = $this
    ->randomMachineName();
  $this->entityTypeManager = $this
    ->createMock(EntityTypeManagerInterface::class);
  $this->entityTypeId = $this
    ->randomMachineName();
  $this->typedConfigManager = $this
    ->createMock(TypedConfigManagerInterface::class);
  $this->userStorage = $this
    ->createMock(UserStorageInterface::class);
  $this->sut = new PaymentMethodConfiguration([
    'pluginId' => $this->bundle,
  ], $this->entityTypeId);
  $this->sut
    ->setEntityTypeManager($this->entityTypeManager);
  $this->sut
    ->setTypedConfig($this->typedConfigManager);
  $this->sut
    ->setUserStorage($this->userStorage);
}