Repository navigation
test: implement Nextcloud 36 SimpleFS folder listing in FakeFolder - #9527
Merged
Merged
Conversation
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Contributor
Code Metrics ReportNote: Metrics describe the revision analyzed by the successful PHPUnit run. Newer commits with pending, canceled or failed checks may not yet be represented in this report.
Details | | main (6749ef4) | #9527 (667dbd1) | +/- |
|---------------------|----------------|-----------------|-------|
| Coverage | 76.8% | 76.8% | 0.0% |
| Files | 511 | 511 | 0 |
| Lines | 28843 | 28843 | 0 |
| Covered | 22154 | 22154 | 0 |
+ | Test Execution Time | 3m42s | 2m39s | -1m3s |Reported by octocov |
11 of 15 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix the PHPUnit class-loading failures against Nextcloud 36/master by updating both LibreSign test doubles implementing
OCP\Files\SimpleFS\ISimpleFolder, without changing Nextcloud or LibreSign production code.Nextcloud 36 added
ISimpleFolder::getFolderListing(): array. Both test classes lacked it, which caused fatal errors while PHPUnit built its suite:tests/php/Unit/Service/FolderServiceTest.php:FakeFolder(the first failure, identified in PR fix: freeze the PDF certification level with the request snapshot #9375).tests/php/Unit/Service/Install/DependencyStorageTest.php:InMemoryDependencyFolder(the next failure after fixingFakeFolder).Both now implement the required method.
FakeFolderreturns an empty listing;InMemoryDependencyFolderreturns its in-memory child folders. The methods also remain compatible with earlier Nextcloud versions.Evidence and scope
FakeFolder, citing missinggetFolderListing().InMemoryDependencyFolderacross SQLite, MySQL, MariaDB and PostgreSQL.implements ISimpleFolderfound two concrete implementing test classes; both are covered now. Other matching files reference the interface without implementing it.cdc2f36829a9bd69e3b6c81795286cd73ec28bb8.After this fix merges into
main, PR #9375 can be rebased and reviewed separately for its DocMDP transition tests.