fix(tests): Order card properties by name to avoid issues

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
Côme Chilliet 2025-02-10 16:08:21 +01:00
parent a4d7623ed7
commit 355fef6ff9
No known key found for this signature in database
GPG key ID: A3E2F658B28C760A

View file

@ -526,7 +526,8 @@ class CardDavBackendTest extends TestCase {
$query = $this->db->getQueryBuilder();
$query->select('*')
->from('cards_properties');
->from('cards_properties')
->orderBy('name');
$qResult = $query->execute();
$result = $qResult->fetchAll();
@ -534,13 +535,13 @@ class CardDavBackendTest extends TestCase {
$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']);