File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -168,9 +168,9 @@ public function testCreateCollectionWithSchemaIndexes(): void
168168 'orders' => [],
169169 ]),
170170 new Document([
171- '$id' => ID::custom('idx_username2 '),
171+ '$id' => ID::custom('idx_username_created_at '),
172172 'type' => Database::INDEX_KEY,
173- 'attributes' => ['username'],
173+ 'attributes' => ['username', '$createdAt' ],
174174 'lengths' => [99], // Length not equal to attributes length
175175 'orders' => [Database::ORDER_DESC],
176176 ]),
@@ -193,10 +193,9 @@ public function testCreateCollectionWithSchemaIndexes(): void
193193 $this->assertEquals($collection->getAttribute('indexes')[1]['lengths'][0], null);
194194
195195 $this->assertEquals($collection->getAttribute('indexes')[2]['attributes'][0], 'username');
196+ $this->assertEquals($collection->getAttribute('indexes')[2]['attributes'][1], '$createdAt');
196197 $this->assertEquals($collection->getAttribute('indexes')[2]['lengths'][0], 99);
197198 $this->assertEquals($collection->getAttribute('indexes')[2]['orders'][0], Database::ORDER_DESC);
198-
199- $this->assertTrue($database->deleteCollection(__FUNCTION__));
200199 }
201200
202201 public function testGetCollectionId(): void
You can’t perform that action at this time.
0 commit comments