You are here

public function EntityCrudTest::setUp in Payment 8.2

Overrides UnitTestCase::setUp

File

tests/src/Unit/Hook/EntityCrudTest.php, line 43

Class

EntityCrudTest
@coversDefaultClass \Drupal\payment\Hook\EntityCrud

Namespace

Drupal\Tests\payment\Unit\Hook

Code

public function setUp() : void {

  // Because this is an integration test between the default managers, we
  // cannot mock the interfaces, but have to mock the classes.
  $this->paymentMethodManager = $this
    ->getMockBuilder(PaymentMethodManager::class)
    ->disableOriginalConstructor()
    ->getMock();
  $this->paymentStatusManager = $this
    ->getMockBuilder(PaymentStatusManager::class)
    ->disableOriginalConstructor()
    ->getMock();
  $this->sut = new EntityCrud($this->paymentMethodManager, $this->paymentStatusManager);
}