You are here

public function PaymentCaptureFormTest::setUp in Payment 8.2

Overrides UnitTestCase::setUp

File

tests/src/Unit/Entity/Payment/PaymentCaptureFormTest.php, line 71

Class

PaymentCaptureFormTest
@coversDefaultClass \Drupal\payment\Entity\Payment\PaymentCaptureForm

Namespace

Drupal\Tests\payment\Unit\Entity\Payment

Code

public function setUp() : void {
  $this->entityRepository = $this
    ->createMock(EntityRepositoryInterface::class);
  $this->stringTranslation = $this
    ->getStringTranslationStub();
  $this->payment = $this
    ->createMock(PaymentInterface::class);
  $this->entityTypeBundleInfo = $this
    ->prophesize(EntityTypeBundleInfoInterface::class)
    ->reveal();
  $this->time = $this
    ->prophesize(TimeInterface::class)
    ->reveal();
  $this->sut = new PaymentCaptureForm($this->entityRepository, $this->entityTypeBundleInfo, $this->time);
  $this->sut
    ->setStringTranslation($this->stringTranslation);
  $this->sut
    ->setEntity($this->payment);
}