protected function QueueTest::queueScore in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/KernelTests/Core/Queue/QueueTest.php \Drupal\KernelTests\Core\Queue\QueueTest::queueScore()
Returns the number of equal items in two arrays.
1 call to QueueTest::queueScore()
- QueueTest::runQueueTest in core/
tests/ Drupal/ KernelTests/ Core/ Queue/ QueueTest.php - Queues and dequeues a set of items to check the basic queue functionality.
File
- core/
tests/ Drupal/ KernelTests/ Core/ Queue/ QueueTest.php, line 108
Class
- QueueTest
- Queues and dequeues a set of items to check the basic queue functionality.
Namespace
Drupal\KernelTests\Core\QueueCode
protected function queueScore($items, $new_items) {
$score = 0;
foreach ($items as $item) {
foreach ($new_items as $new_item) {
if ($item === $new_item) {
$score++;
}
}
}
return $score;
}