Skip to content

Commit

Permalink
fix: rewrite tests to accepted channel named product index
Browse files Browse the repository at this point in the history
  • Loading branch information
lanfisis committed Aug 26, 2022
1 parent 8ad6f5a commit 749598e
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public static function getSubscribedEvents()

public function onMappingProvider(MappingProviderEvent $event): void
{
if ('monsieurbiz_product' !== $event->getIndexCode()) {
if (false === (bool) preg_match('/monsieurbiz_product$/', $event->getIndexCode())) {
return;
}
$mapping = $event->getMapping();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function build(
string $aggregationCode,
array $aggregationData
): ?array {
if ('monsieurbiz_product' !== $documentable->getIndexCode() || 'attributes' !== $aggregationCode) {
if (false === (bool) preg_match('/monsieurbiz_product$/', $documentable->getIndexCode()) || 'attributes' !== $aggregationCode) {
return null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function build(
string $aggregationCode,
array $aggregationData
): ?array {
if ('monsieurbiz_product' !== $documentable->getIndexCode() || 'main_taxon' !== $aggregationCode) {
if (false === (bool) preg_match('/monsieurbiz_product$/', $documentable->getIndexCode()) || 'main_taxon' !== $aggregationCode) {
return null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function build(
string $aggregationCode,
array $aggregationData
): ?array {
if ('monsieurbiz_product' !== $documentable->getIndexCode() || 'options' !== $aggregationCode) {
if (false === (bool) preg_match('/monsieurbiz_product$/', $documentable->getIndexCode()) || 'options' !== $aggregationCode) {
return null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function build(
string $aggregationCode,
array $aggregationData
): ?array {
if ('monsieurbiz_product' !== $documentable->getIndexCode() || 'prices' !== $aggregationCode) {
if (false === (bool) preg_match('/monsieurbiz_product$/', $documentable->getIndexCode()) || 'prices' !== $aggregationCode) {
return null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function build(
string $aggregationCode,
array $aggregationData
): ?array {
if ('monsieurbiz_product' !== $documentable->getIndexCode() || 'taxons' !== $aggregationCode) {
if (false === (bool) preg_match('/monsieurbiz_product$/', $documentable->getIndexCode()) || 'taxons' !== $aggregationCode) {
return null;
}

Expand Down

0 comments on commit 749598e

Please sign in to comment.