Skip to content

[TEST] Refactor collection tests for granular display options#2042

Open
beatrycze-volk wants to merge 2 commits into
kitodo:mainfrom
beatrycze-volk:collection-tests
Open

[TEST] Refactor collection tests for granular display options#2042
beatrycze-volk wants to merge 2 commits into
kitodo:mainfrom
beatrycze-volk:collection-tests

Conversation

@beatrycze-volk

Copy link
Copy Markdown
Collaborator

Breaks down the comprehensive canListAction and canShowAction tests into several distinct test cases. This enables specific verification of the showSingle, showOverview, and showDocuments settings, ensuring their correct behavior in the collection view.

New private helper functions getContentsList and getContentsShow are extracted to reduce duplication and improve readability across the new test cases. Test attributes are updated to PHPUnit 8+.

Depends on #2041

…ontroller

The `showSingle` setting previously caused a redirect to a single collection view when it was disabled (empty or false). This change corrects the condition so that the redirect only occurs when `showSingle` is explicitly enabled (`true`), aligning with its intended purpose to directly display a single collection.
@beatrycze-volk beatrycze-volk added the ⟳ maintenance A task to keep the code up-to-date and manageable. label Jun 30, 2026
@beatrycze-volk beatrycze-volk self-assigned this Jun 30, 2026
Breaks down the comprehensive `canListAction` and `canShowAction` tests into several distinct test cases. This enables specific verification of the `showSingle`, `showOverview`, and `showDocuments` settings, ensuring their correct behavior in the collection view.

New private helper functions `getContentsList` and `getContentsShow` are extracted to reduce duplication and improve readability across the new test cases. Test attributes are updated to PHPUnit 8+.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⟳ maintenance A task to keep the code up-to-date and manageable.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants