mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
fix collections test for updated collections config
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user