Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix(tests): Order card properties by name to avoid issues
Signed-off-by: Côme Chilliet <[email protected]>
  • Loading branch information
come-nc committed Feb 10, 2025
commit 355fef6ff92b3ce1206bbbed17947e588ff89436
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
Loading