-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IBX-7361: The search criterion is searching for all text fields of contents #41
Conversation
src/lib/EventDispatcher/EventListener/ContentSuggestionSubscriber.php
Outdated
Show resolved
Hide resolved
tests/lib/EventDispatcher/EventListener/ContentSuggestionSubscriberTest.php
Outdated
Show resolved
Hide resolved
tests/lib/EventDispatcher/EventListener/ContentSuggestionSubscriberTest.php
Outdated
Show resolved
Hide resolved
tests/lib/EventDispatcher/EventListener/ContentSuggestionSubscriberTest.php
Outdated
Show resolved
Hide resolved
tests/lib/EventDispatcher/EventListener/ContentSuggestionSubscriberTest.php
Outdated
Show resolved
Hide resolved
tests/lib/EventDispatcher/EventListener/ContentSuggestionSubscriberTest.php
Outdated
Show resolved
Hide resolved
tests/lib/EventDispatcher/EventListener/ContentSuggestionSubscriberTest.php
Outdated
Show resolved
Hide resolved
tests/lib/EventDispatcher/EventListener/ContentSuggestionSubscriberTest.php
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
$this->loggerMock | ||
->expects($this->once()) | ||
->method('error'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What will be the message?
$this->loggerMock | |
->expects($this->once()) | |
->method('error'); | |
$this->loggerMock | |
->expects(self::once()) | |
->method('error') | |
->with(...); |
Will the exception, if any, be logged into it?
$subscriber = new ContentSuggestionSubscriber($searchService, $mapper); | ||
$sortingDefinitionRegistry = $this->getSortingDefinitionRegistryMock(); | ||
|
||
$subscriber = new ContentSuggestionSubscriber($searchService, $mapper, $sortingDefinitionRegistry); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can, although it is slightly out of scope as it enhances the existing test, make assertions about logger not being called (self::never()
).
private bool $searchServiceSupportsScoring = false; | ||
|
||
/** @var \Psr\Log\LoggerInterface&\PHPUnit\Framework\MockObject\MockObject */ | ||
private LoggerInterface $loggerMock; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my opinion, since logger is never configured during setUp
or used across different methods, it should be kept as a local variable.
But it's only an opinion and feel free to discard it.
Quality Gate passedThe SonarCloud Quality Gate passed, but some issues were introduced. 1 New issue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regression tests passed
This PR fixes sorting issues
Checklist:
$ composer fix-cs
)