You are here

protected function TmgmtExtensionSuitTestBase::isItemAddedToQueue 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::isItemAddedToQueue()

Checks if job was added to a queue.

Parameters

$queue:

$jobId:

Return value

mixed

3 calls to TmgmtExtensionSuitTestBase::isItemAddedToQueue()
CheckEntityChangesTest::testDoNotTrackTranslatableEntityChanges in tests/src/Functional/CheckEntityChangesTest.php
Test "Track changes of the translatable entities" feature is turned off.
CheckEntityChangesTest::testTrackTranslatableEntityChanges in tests/src/Functional/CheckEntityChangesTest.php
Test "Track changes of the translatable entities" feature is turned on.
CheckStatusTest::testCheckStatus in tests/src/Functional/CheckStatusTest.php
Test tmgmt_extension_suit_add_to_check_status() function.

File

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

Class

TmgmtExtensionSuitTestBase
Basic class for tmgmt extension module.

Namespace

Drupal\Tests\tmgmt_extension_suit\Functional

Code

protected function isItemAddedToQueue($queue, $jobId) {
  return Drupal::database()
    ->select('queue', 'q')
    ->condition('q.name', $queue)
    ->condition('q.data', "a:1:{s:2:\"id\";i:{$jobId};}")
    ->countQuery()
    ->execute()
    ->fetchField();
}