public function SocialDrupalContext::iCheckIFQueueItemsProcessed in Open Social 10.1.x
Same name and namespace in other branches
- 10.3.x tests/behat/features/bootstrap/SocialDrupalContext.php \Drupal\social\Behat\SocialDrupalContext::iCheckIFQueueItemsProcessed()
- 10.0.x tests/behat/features/bootstrap/SocialDrupalContext.php \Drupal\social\Behat\SocialDrupalContext::iCheckIFQueueItemsProcessed()
- 10.2.x tests/behat/features/bootstrap/SocialDrupalContext.php \Drupal\social\Behat\SocialDrupalContext::iCheckIFQueueItemsProcessed()
@When I check if queue items processed :item_name
Parameters
$item_name:
File
- tests/
behat/ features/ bootstrap/ SocialDrupalContext.php, line 257
Class
- SocialDrupalContext
- Provides pre-built step definitions for interacting with Open Social.
Namespace
Drupal\social\BehatCode
public function iCheckIFQueueItemsProcessed($item_name = "") {
$query = \Drupal::database()
->select('queue', 'q');
$query
->addField('q', 'item_id');
$query
->condition('q.name', $item_name);
$item = $query
->execute()
->fetchField();
if (!empty($item)) {
throw new \Exception('There are exist stuck items in queue.');
}
}