1 system.test QueueTestCase::queueScore($items, $new_items)

This function returns the number of equal items in two arrays.

File

core/modules/system/tests/system.test, line 1959
Tests for system.module.

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;
}