diff --git a/tests/unit/General/CollectionsTest.php b/tests/unit/General/CollectionsTest.php index 1d648f93c2..73a9ccd0c2 100644 --- a/tests/unit/General/CollectionsTest.php +++ b/tests/unit/General/CollectionsTest.php @@ -15,16 +15,18 @@ class CollectionsTest extends TestCase public function testDuplicateRules(): void { - foreach ($this->collections as $key => $collection) { - if (array_key_exists('attributes', $collection)) { - foreach ($collection['attributes'] as $check) { - $occurrences = 0; - foreach ($collection['attributes'] as $attribute) { - if ($attribute['$id'] == $check['$id']) { - $occurrences++; + foreach ($this->collections as $key => $sections) { + foreach ($sections as $key => $collection) { + if (array_key_exists('attributes', $collection)) { + foreach ($collection['attributes'] as $check) { + $occurrences = 0; + foreach ($collection['attributes'] as $attribute) { + if ($attribute['$id'] == $check['$id']) { + $occurrences++; + } } + $this->assertEquals(1, $occurrences); } - $this->assertEquals(1, $occurrences); } } }