Skip to content

IBX-6773: [Tests] Used bookmark gateway constants instead of hardcoded table and column names - #835

Merged
alongosz merged 2 commits into
5.0from
bookmark-gateway-constants-in-tests
Sep 17, 2026
Merged

alongosz merged 2 commits into
5.0from
bookmark-gateway-constants-in-tests

Conversation

@vidarl

@vidarl vidarl commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor
🎫 Issue n/a

Description:

Three tests referred to database tables and columns by string literal. The bookmark table was renamed from ezcontentbrowsebookmark to ibexa_content_bookmark between 4.6 and 5.0, so those literals did not survive the last merge up.
The gateway already exposes the names as constants: DoctrineDatabase::TABLE_BOOKMARKS and COLUMN_*.
Using them in LocationServiceTest and IsBookmarkedQueryBuilderTest keeps both tests correct across a rename, and keeps the expected sub-query in IsBookmarkedQueryBuilderTest in step with what the query builder actually produces.

IdSortClauseQueryBuilderTest had the same problem with the content item table, renamed from ezcontentobject to ibexa_content; it now uses Content\Gateway::CONTENT_ITEM_TABLE alongside the two table constants it already used. That one stayed unnoticed because the test asserts on the generated SQL without ever executing it.

For QA:

Documentation:

@alongosz alongosz changed the title [Tests] Used bookmark gateway constants instead of hardcoded table and column names IBX-6773: [Tests] Used bookmark gateway constants instead of hardcoded table and column names Sep 16, 2026
@sonarqubecloud

Copy link
Copy Markdown

@vidarl

vidarl commented Sep 17, 2026

Copy link
Copy Markdown
Contributor Author

Re-requesting approval as I added one more commit, ref discussion in #834 (comment)

@alongosz
alongosz merged commit 9276aeb into 5.0 Sep 17, 2026
21 checks passed
@alongosz
alongosz deleted the bookmark-gateway-constants-in-tests branch September 17, 2026 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants