You are here

public function EventDispatcherCollectionTest::testPreResumeContext in Payment 8.2

@covers ::preResumeContext

File

tests/src/Unit/EventDispatcherCollectionTest.php, line 225

Class

EventDispatcherCollectionTest
@coversDefaultClass \Drupal\payment\EventDispatcherCollection

Namespace

Drupal\Tests\payment\Unit

Code

public function testPreResumeContext() {
  $payment = $this
    ->createMock(PaymentInterface::class);
  $event_dispatcher_a = $this
    ->createMock(EventDispatcherInterface::class);
  $event_dispatcher_a
    ->expects($this
    ->atLeastOnce())
    ->method('preResumeContext')
    ->with($payment);
  $event_dispatcher_b = $this
    ->createMock(EventDispatcherInterface::class);
  $event_dispatcher_b
    ->expects($this
    ->atLeastOnce())
    ->method('preResumeContext')
    ->with($payment);
  $this->sut
    ->addEventDispatcher($event_dispatcher_a);
  $this->sut
    ->addEventDispatcher($event_dispatcher_b);
  $this->sut
    ->preResumeContext($payment);
}