You are here

protected function TmgmtExtensionSuitTestBase::getCountOfItemsInQueue in TMGMT Extension Suite 8.2

Same name and namespace in other branches
  1. 8.3 tests/src/Functional/TmgmtExtensionSuitTestBase.php \Drupal\Tests\tmgmt_extension_suit\Functional\TmgmtExtensionSuitTestBase::getCountOfItemsInQueue()

Returns amount of items in a given queue.

Parameters

string $queueName:

Return value

mixed

1 call to TmgmtExtensionSuitTestBase::getCountOfItemsInQueue()
CheckStatusTest::testCheckStatus in tests/src/Functional/CheckStatusTest.php
Test tmgmt_extension_suit_add_to_check_status() function.

File

tests/src/Functional/TmgmtExtensionSuitTestBase.php, line 189

Class

TmgmtExtensionSuitTestBase
Basic class for tmgmt extension module.

Namespace

Drupal\Tests\tmgmt_extension_suit\Functional

Code

protected function getCountOfItemsInQueue($queueName) {
  return Drupal::database()
    ->select('queue', 'q')
    ->condition('q.name', $queueName)
    ->countQuery()
    ->execute()
    ->fetchField();
}