You are here

protected function SmartlingTestBase::getCountOfItemsInQueue in TMGMT Translator Smartling 8.3

Same name and namespace in other branches
  1. 8.4 tests/src/Functional/SmartlingTestBase.php \Drupal\Tests\tmgmt_smartling\Functional\SmartlingTestBase::getCountOfItemsInQueue()

Returns amount of items in a given queue.

Parameters

string $queueName:

Return value

mixed

9 calls to SmartlingTestBase::getCountOfItemsInQueue()
JobsTest::testAddToJobQueueAsync in tests/src/Functional/JobsTest.php
Add to job form, async mode: two jobs (queue mode).
JobsTest::testAddToJobQueueSync in tests/src/Functional/JobsTest.php
Add to job form, sync mode: two jobs (queue mode).
JobsTest::testAddToJobSingleAsync in tests/src/Functional/JobsTest.php
Add to job form, async mode: single job.
JobsTest::testAddToJobSingleSync in tests/src/Functional/JobsTest.php
Add to job form, sync mode: single job.
JobsTest::testBucketJob in tests/src/Functional/JobsTest.php
Test bucket job.

... See full list

File

tests/src/Functional/SmartlingTestBase.php, line 263

Class

SmartlingTestBase
Basic tests for the Smartling translator.

Namespace

Drupal\Tests\tmgmt_smartling\Functional

Code

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