From 7246b2ec136fe2fe95330c409f3cfa97aefe2bae Mon Sep 17 00:00:00 2001 From: Vidar Langseid Date: Thu, 30 May 2024 14:19:27 +0200 Subject: [PATCH] fixup! IBX-6773: Bookmarks for non-accessible contents cause exception: Added filter query test --- .../Location/BookmarkQueryBuilderTest.php | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 eZ/Publish/Core/Persistence/Legacy/Tests/Filter/CriterionQueryBuilder/Location/BookmarkQueryBuilderTest.php diff --git a/eZ/Publish/Core/Persistence/Legacy/Tests/Filter/CriterionQueryBuilder/Location/BookmarkQueryBuilderTest.php b/eZ/Publish/Core/Persistence/Legacy/Tests/Filter/CriterionQueryBuilder/Location/BookmarkQueryBuilderTest.php new file mode 100644 index 0000000000..eb3e52bae0 --- /dev/null +++ b/eZ/Publish/Core/Persistence/Legacy/Tests/Filter/CriterionQueryBuilder/Location/BookmarkQueryBuilderTest.php @@ -0,0 +1,45 @@ + [ + new Criterion\Bookmark(14), + 'bookmark.user_id = :dcValue1', + ['dcValue1' => 14], + ]; + + yield 'Bookmarks locations for user_id=14 OR user_id=7' => [ + new Criterion\LogicalOr( + [ + new Criterion\Bookmark(14), + new Criterion\Bookmark(7), + ] + ), + '(bookmark.user_id = :dcValue1) OR (bookmark.user_id = :dcValue2)', + ['dcValue1' => 14, 'dcValue2' => 7], + ]; + } + + protected function getCriterionQueryBuilders(): iterable + { + return [new BookmarkQueryBuilder()]; + } +}