You are here

protected function RngMessageRules::countMessagesInQueue in RNG - Events and Registrations 8

Same name and namespace in other branches
  1. 8.2 tests/src/Kernel/RngMessageRules.php \Drupal\Tests\rng\Kernel\RngMessageRules::countMessagesInQueue()
  2. 3.x tests/src/Kernel/RngMessageRules.php \Drupal\Tests\rng\Kernel\RngMessageRules::countMessagesInQueue()

Count number of messages in Courier queue.

Return value

integer

2 calls to RngMessageRules::countMessagesInQueue()
RngMessageRules::testRngRegistrationCreateMessages in tests/src/Kernel/RngMessageRules.php
Test messages are sent on registration creation.
RngMessageRules::testRngRegistrationUpdateMessages in tests/src/Kernel/RngMessageRules.php
Test messages are sent on registration update.

File

tests/src/Kernel/RngMessageRules.php, line 183

Class

RngMessageRules
Tests RNG message rules are executed.

Namespace

Drupal\Tests\rng\Kernel

Code

protected function countMessagesInQueue() {
  return \Drupal::entityTypeManager()
    ->getStorage('courier_message_queue_item')
    ->getQuery()
    ->count()
    ->execute();
}