Skip to content

Commit

Permalink
fix(tests): Order card properties by name to avoid issues
Browse files Browse the repository at this point in the history
Signed-off-by: Côme Chilliet <[email protected]>
  • Loading branch information
come-nc committed Feb 10, 2025
1 parent a4d7623 commit 355fef6
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions apps/dav/tests/unit/CardDAV/CardDavBackendTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -526,21 +526,22 @@ public function testUpdateProperties(): void {

$query = $this->db->getQueryBuilder();
$query->select('*')
->from('cards_properties');
->from('cards_properties')
->orderBy('name');

$qResult = $query->execute();
$result = $qResult->fetchAll();
$qResult->closeCursor();

$this->assertSame(2, count($result));

$this->assertSame('UID', $result[0]['name']);
$this->assertSame($cardUri, $result[0]['value']);
$this->assertSame('FN', $result[0]['name']);
$this->assertSame('John Doe', $result[0]['value']);
$this->assertSame($bookId, (int)$result[0]['addressbookid']);
$this->assertSame($cardId, (int)$result[0]['cardid']);

$this->assertSame('FN', $result[1]['name']);
$this->assertSame('John Doe', $result[1]['value']);
$this->assertSame('UID', $result[1]['name']);
$this->assertSame($cardUri, $result[1]['value']);
$this->assertSame($bookId, (int)$result[1]['addressbookid']);
$this->assertSame($cardId, (int)$result[1]['cardid']);

Expand Down

0 comments on commit 355fef6

Please sign in to comment.