You are here

public function PaymentDeleteFormTest::setUp in Payment 8.2

Overrides UnitTestCase::setUp

File

tests/src/Unit/Entity/Payment/PaymentDeleteFormTest.php, line 83

Class

PaymentDeleteFormTest
@coversDefaultClass \Drupal\payment\Entity\Payment\PaymentDeleteForm

Namespace

Drupal\Tests\payment\Unit\Entity\Payment

Code

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