From 3d3588b3dedba42c8246a070cdb285213abfe7d0 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Wed, 10 Jul 2024 15:50:50 +0200 Subject: [PATCH] IBX-8378: [Tests] Fixed setting image field as searchable for tests (#403) For more details see https://issues.ibexa.co/browse/IBX-8378 and https://github.com/ibexa/core/pull/403 Key changes: * [Tests] Fixed setting image field as searchable for integration tests ---- Co-Authored-By: Vidar Langseid --- .../integration/Core/Repository/SearchServiceImageTest.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/integration/Core/Repository/SearchServiceImageTest.php b/tests/integration/Core/Repository/SearchServiceImageTest.php index b0586a14ab..0d6c0f6731 100644 --- a/tests/integration/Core/Repository/SearchServiceImageTest.php +++ b/tests/integration/Core/Repository/SearchServiceImageTest.php @@ -365,6 +365,11 @@ private function ensureImageFieldTypeIsSearchable(ContentType $contentType): voi ); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\BadStateException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException + */ private function setFieldTypeAsSearchable( ContentTypeDraft $contentTypeDraft, FieldDefinition $fieldDefinition @@ -379,5 +384,6 @@ private function setFieldTypeAsSearchable( $fieldDefinition, $fieldDefinitionUpdateStruct ); + $contentTypeService->publishContentTypeDraft($contentTypeDraft); } }