public function SymfonyEventDispatcherTest::testAlterQueueLoadedPaymentIds in Payment 8.2
@covers ::alterQueueLoadedPaymentIds
File
- tests/
src/ Unit/ SymfonyEventDispatcherTest.php, line 55
Class
- SymfonyEventDispatcherTest
- @coversDefaultClass \Drupal\payment\SymfonyEventDispatcher
Namespace
Drupal\Tests\payment\UnitCode
public function testAlterQueueLoadedPaymentIds() {
$queue_id = $this
->randomMachineName();
$category_id = $this
->randomMachineName();
$owner_id = mt_rand();
$payment_ids = [
mt_rand(),
mt_rand(),
mt_rand(),
];
$this->symfonyEventDispatcher
->expects($this
->once())
->method('dispatch')
->with(PaymentEvents::PAYMENT_QUEUE_PAYMENT_IDS_ALTER, $this
->isInstanceOf(PaymentQueuePaymentIdsAlter::class));
$this
->assertSame($payment_ids, $this->sut
->alterQueueLoadedPaymentIds($queue_id, $category_id, $owner_id, $payment_ids));
}