Skip to content
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

Merged
merged 5 commits into from
Jan 9, 2024

Conversation

kisztof
Copy link
Contributor

@kisztof kisztof commented Dec 21, 2023

Question Answer
Tickets IBX-7361
Bug fix? yes
New feature? no
BC breaks? no
Tests pass? yes
Doc needed? no
License GPL-2.0

This PR fixes sorting issues

Checklist:

  • Implement tests
  • Coding standards ($ composer fix-cs)

Copy link
Contributor

@Steveb-p Steveb-p left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Comment on lines +118 to +120
$this->loggerMock
->expects($this->once())
->method('error');
Copy link
Contributor

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?

Suggested change
$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);
Copy link
Contributor

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;
Copy link
Contributor

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.

Copy link

sonarcloud bot commented Jan 9, 2024

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

1 New issue
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link

@bogusez bogusez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regression tests passed

@webhdx webhdx merged commit 2439c63 into main Jan 9, 2024
9 checks passed
@webhdx webhdx deleted the IBX-7361 branch January 9, 2024 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants