Skip to content

Commit

Permalink
Merge pull request #10119 from nextcloud/refactor/phpunit-code-quality
Browse files Browse the repository at this point in the history
refactor(rector): Enable PHPUnit code quality refactorings
  • Loading branch information
kesselb authored Sep 9, 2024
2 parents 02ea497 + b999660 commit 9854ce5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 5 additions & 1 deletion rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,8 @@
])
->withSkip([
__DIR__ . '/lib/Vendor'
]);
])
->withPreparedSets(
phpunitCodeQuality: true,
phpunit: true,
);
4 changes: 1 addition & 3 deletions tests/Integration/Db/ProvisioningMapperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,7 @@ public function testGetAll() {

$this->assertIsArray($results);
$this->assertNotEmpty($results);
foreach ($results as $result) {
$this->assertInstanceOf(Provisioning::class, $result);
}
$this->assertContainsOnlyInstancesOf(Provisioning::class, $results);
}

public function testGet() {
Expand Down
4 changes: 1 addition & 3 deletions tests/Integration/Service/FolderMapperIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ public function testGetFolders() {
$folders = $this->mapper->getFolders($account, $client);

$this->assertGreaterThan(1, count($folders));
foreach ($folders as $folder) {
$this->assertInstanceOf(Folder::class, $folder);
}
$this->assertContainsOnlyInstancesOf(Folder::class, $folders);
}
}

0 comments on commit 9854ce5

Please sign in to comment.