diff --git a/src/Model/FeedItem/MergadoFeedItemFactory.php b/src/Model/FeedItem/MergadoFeedItemFactory.php index d7fbe74..a93dae0 100644 --- a/src/Model/FeedItem/MergadoFeedItemFactory.php +++ b/src/Model/FeedItem/MergadoFeedItemFactory.php @@ -68,7 +68,7 @@ public function createForProduct(Product $product, DomainConfig $domainConfig): return new MergadoFeedItem( $product->getId(), $product->getCatnum(), - $product->getFullnames()[$domainConfig->getLocale()], + $product->getFullName($domainConfig->getLocale()), $this->productUrlsBatchLoader->getProductUrl($product, $domainConfig), $this->categoryFacade->getCategoryNamesInPathFromRootToProductMainCategoryOnDomain($product, $domainConfig), $this->getProductUsp($product, $domainId), diff --git a/tests/Unit/MergadoFeedItemTest.php b/tests/Unit/MergadoFeedItemTest.php index 988d4e4..c2c450f 100644 --- a/tests/Unit/MergadoFeedItemTest.php +++ b/tests/Unit/MergadoFeedItemTest.php @@ -177,7 +177,7 @@ private function doSetUp(bool $isProductAvailableOnStock): void $this->defaultProduct = $this->createMock(Product::class); $this->defaultProduct->method('getId')->willReturn(1); $this->defaultProduct->method('getCatnum')->willReturn('catnum'); - $this->defaultProduct->method('getFullNames')->willReturn(['en' => 'product name']); + $this->defaultProduct->method('getFullName')->willReturn('product name'); $this->defaultProduct->method('getDescription')->willReturn('description'); $this->defaultProduct->method('getShortDescriptionUsp1')->willReturn('short description usp 1');