You are here

protected function TmgmtExtensionSuitTestBase::isItemAddedToQueue in TMGMT Extension Suite 8.3

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

Checks if job was added to a queue.

Parameters

string $queue: Queue name.

int $jobId: Job id.

Return value

mixed Returns flag whether item is in the queue or not.

6 calls to TmgmtExtensionSuitTestBase::isItemAddedToQueue()
CheckEntityChangesTest::testDoNotTrackTranslatableEntityChanges in tests/src/Functional/CheckEntityChangesTest.php
Test "Track changes of the translatable entities" feature is turned off.
CheckEntityChangesTest::testDoNotTrackTranslatableEntityChangesIfNoLanguagesSelected in tests/src/Functional/CheckEntityChangesTest.php
Test "Track changes of the translatable entities" feature is turned on.
CheckEntityChangesTest::testTrackTranslatableEntityChanges in tests/src/Functional/CheckEntityChangesTest.php
Test "Track changes of the translatable entities" feature is turned on.
CheckEntityChangesTest::testTrackTranslatableEntityChangesAllLanguagesSelected in tests/src/Functional/CheckEntityChangesTest.php
Test "Track changes of the translatable entities" feature is turned on.
CheckEntityChangesTest::testTrackTranslatableEntityChangesNotAllLanguagesSelected in tests/src/Functional/CheckEntityChangesTest.php
Test "Track changes of the translatable entities" feature is turned on.

... See full list

File

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

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();
}