protected function TmgmtExtensionSuitTestBase::getCountOfItemsInQueue in TMGMT Extension Suite 8.3
Same name and namespace in other branches
- 8.2 tests/src/Functional/TmgmtExtensionSuitTestBase.php \Drupal\Tests\tmgmt_extension_suit\Functional\TmgmtExtensionSuitTestBase::getCountOfItemsInQueue()
Returns amount of items in a given queue.
Parameters
string $queueName: Queue name.
Return value
int|mixed Returns number of queue items in a given queue.
File
- tests/
src/ Functional/ TmgmtExtensionSuitTestBase.php, line 210
Class
- TmgmtExtensionSuitTestBase
- Basic class for tmgmt extension module.
Namespace
Drupal\Tests\tmgmt_extension_suit\FunctionalCode
protected function getCountOfItemsInQueue($queueName) {
return Drupal::database()
->select('queue', 'q')
->condition('q.name', $queueName)
->countQuery()
->execute()
->fetchField();
}