public function EventDispatcherCollectionTest::testPreExecutePayment in Payment 8.2
@covers ::preExecutePayment
File
- tests/
src/ Unit/ EventDispatcherCollectionTest.php, line 101
Class
- EventDispatcherCollectionTest
- @coversDefaultClass \Drupal\payment\EventDispatcherCollection
Namespace
Drupal\Tests\payment\UnitCode
public function testPreExecutePayment() {
$payment = $this
->createMock(PaymentInterface::class);
$event_dispatcher_a = $this
->createMock(EventDispatcherInterface::class);
$event_dispatcher_a
->expects($this
->atLeastOnce())
->method('preExecutePayment')
->with($payment);
$event_dispatcher_b = $this
->createMock(EventDispatcherInterface::class);
$event_dispatcher_b
->expects($this
->atLeastOnce())
->method('preExecutePayment')
->with($payment);
$this->sut
->addEventDispatcher($event_dispatcher_a);
$this->sut
->addEventDispatcher($event_dispatcher_b);
$this->sut
->preExecutePayment($payment);
}