function QueueTestCase::queueScore
This function returns the number of equal items in two arrays.
1 call to QueueTestCase::queueScore()
- QueueTestCase::testQueue in modules/
system/ system.test - Queues and dequeues a set of items to check the basic queue functionality.
File
-
modules/
system/ system.test, line 2194
Class
- QueueTestCase
- Test the basic queue functionality.
Code
function queueScore($items, $new_items) {
$score = 0;
foreach ($items as $item) {
foreach ($new_items as $new_item) {
if ($item === $new_item) {
$score++;
}
}
}
return $score;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.