You are here

public function SymfonyEventDispatcherTest::testPreExecutePayment in Payment 8.2

@covers ::preExecutePayment

File

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

Class

SymfonyEventDispatcherTest
@coversDefaultClass \Drupal\payment\SymfonyEventDispatcher

Namespace

Drupal\Tests\payment\Unit

Code

public function testPreExecutePayment() {
  $payment = $this
    ->createMock(PaymentInterface::class);
  $this->symfonyEventDispatcher
    ->expects($this
    ->once())
    ->method('dispatch')
    ->with(PaymentEvents::PAYMENT_PRE_EXECUTE, $this
    ->isInstanceOf(PaymentPreExecute::class));
  $this->sut
    ->preExecutePayment($payment);
}