You are here

public function SymfonyEventDispatcherTest::testSetPaymentStatus in Payment 8.2

@covers ::setPaymentStatus

File

tests/src/Unit/SymfonyEventDispatcherTest.php, line 71

Class

SymfonyEventDispatcherTest
@coversDefaultClass \Drupal\payment\SymfonyEventDispatcher

Namespace

Drupal\Tests\payment\Unit

Code

public function testSetPaymentStatus() {
  $payment = $this
    ->createMock(PaymentInterface::class);
  $previous_payment_status = $this
    ->createMock(PaymentStatusInterface::class);
  $this->symfonyEventDispatcher
    ->expects($this
    ->once())
    ->method('dispatch')
    ->with(PaymentEvents::PAYMENT_STATUS_SET, $this
    ->isInstanceOf(PaymentStatusSet::class));
  $this->sut
    ->setPaymentStatus($payment, $previous_payment_status);
}