protected function SmartlingTestBase::fetchQueueItemsData in TMGMT Translator Smartling 8.4
Same name and namespace in other branches
- 8.3 tests/src/Functional/SmartlingTestBase.php \Drupal\Tests\tmgmt_smartling\Functional\SmartlingTestBase::fetchQueueItemsData()
Returns queue items data.
Parameters
$queue_name:
Return value
array
1 call to SmartlingTestBase::fetchQueueItemsData()
- JobsTest::testBucketJob in tests/
src/ Functional/ JobsTest.php - Test bucket job.
File
- tests/
src/ Functional/ SmartlingTestBase.php, line 285
Class
- SmartlingTestBase
- Basic tests for the Smartling translator.
Namespace
Drupal\Tests\tmgmt_smartling\FunctionalCode
protected function fetchQueueItemsData($queue_name) {
$result = [];
$data_items = \Drupal::database()
->select('queue', 'q')
->fields('q', [
'data',
])
->condition('q.name', $queue_name)
->execute()
->fetchCol();
foreach ($data_items as $data_item) {
$result[] = unserialize($data_item);
}
return $result;
}