protected function ExportTest::processQueue in Acquia Content Hub 8.2
Processes queue items.
Parameters
int $items_expected: Number of items to expect in the queue.
array $cdf_expectations: List of CDF object expectations.
callable $callback: CDF Object verification method.
Throws
\Exception
3 calls to ExportTest::processQueue()
- ExportTest::testDelete in tests/
src/ Kernel/ ExportTest.php - Tests deleting content.
- ExportTest::testPublishing in tests/
src/ Kernel/ ExportTest.php - Tests Acquia ContentHub content/configuration export.
- ExportTest::testPublishingUserProfile in tests/
src/ Kernel/ ExportTest.php - Tests publishing of node and user profile.
File
- tests/
src/ Kernel/ ExportTest.php, line 1238
Class
- ExportTest
- Tests entity exports.
Namespace
Drupal\Tests\acquia_contenthub\KernelCode
protected function processQueue($items_expected, array $cdf_expectations = [], callable $callback = NULL) {
$items = 0;
while ($item = $this->queue
->claimItem()) {
$this->queueWorker
->processItem($item->data);
$this->queue
->deleteItem($item);
if ($callback) {
$callback(...$cdf_expectations[$items]);
}
$items++;
}
$this
->assertEquals($items_expected, $items);
}