Skip to content

Commit

Permalink
Merge pull request #48286 from nextcloud/backport/48215/stable30
Browse files Browse the repository at this point in the history
[stable30] fix(tests): Fix test selection and run unit tests of DAV and user_status
  • Loading branch information
nickvergessen authored Sep 25, 2024
2 parents 76ec595 + abe8243 commit cfb8f12
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 15,915 deletions.
32 changes: 21 additions & 11 deletions apps/dav/tests/integration/UserMigration/ContactsMigratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,20 +114,30 @@ public function testImportExportAsset(string $userId, string $filename, string $
$exportMetadata = array_filter(['displayName' => $displayName, 'description' => $description]);

$this->assertEquals($importMetadata, $exportMetadata);
$this->assertEquals(count($importCards), count($exportCards));
$this->assertSameSize($importCards, $exportCards);

for ($i = 0; $i < count($importCards); ++$i) {
$this->assertNotEqualsCanonicalizing(
$this->getPropertiesChangedOnImport($importCards[$i]),
$this->getPropertiesChangedOnImport($exportCards[$i]),
);
$importProperties = [];
$exportProperties = [];
for ($i = 0, $iMax = count($importCards); $i < $iMax; ++$i) {
$importProperties[] = $this->getPropertiesChangedOnImport($importCards[$i]);
$exportProperties[] = $this->getPropertiesChangedOnImport($exportCards[$i]);
}

for ($i = 0; $i < count($importCards); ++$i) {
$this->assertEqualsCanonicalizing(
$this->getProperties($importCards[$i]),
$this->getProperties($exportCards[$i]),
);
$this->assertNotEqualsCanonicalizing(
$importProperties,
$exportProperties,
);

$importProperties = [];
$exportProperties = [];
for ($i = 0, $iMax = count($importCards); $i < $iMax; ++$i) {
$importProperties[] = $this->getProperties($importCards[$i]);
$exportProperties[] = $this->getProperties($exportCards[$i]);
}

$this->assertEqualsCanonicalizing(
$importProperties,
$exportProperties,
);
}
}
Loading

0 comments on commit cfb8f12

Please sign in to comment.