From 7fb0e5abb2c75f498b02877be124f41d2646c78a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toma=CC=81s=CC=8C=20Ludvik?= Date: Tue, 12 Mar 2024 14:03:29 +0100 Subject: [PATCH] all Luigi's Box searches can now be run independently of each other --- src/Model/LuigisBoxBrandFeedItem.php | 4 ++-- tests/Unit/LuigisBoxBrandFeedItemTest.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Model/LuigisBoxBrandFeedItem.php b/src/Model/LuigisBoxBrandFeedItem.php index 836d48e..a3ca022 100644 --- a/src/Model/LuigisBoxBrandFeedItem.php +++ b/src/Model/LuigisBoxBrandFeedItem.php @@ -8,7 +8,7 @@ class LuigisBoxBrandFeedItem implements FeedItemInterface { - public const UNIQUE_IDENTIFIER_PREFIX = 'brand-'; + public const UNIQUE_BRAND_IDENTIFIER_PREFIX = 'brand'; /** * @param int $id @@ -37,7 +37,7 @@ public function getSeekId(): int */ public function getIdentity(): string { - return static::UNIQUE_IDENTIFIER_PREFIX . $this->id; + return static::UNIQUE_BRAND_IDENTIFIER_PREFIX . '-' . $this->id; } /** diff --git a/tests/Unit/LuigisBoxBrandFeedItemTest.php b/tests/Unit/LuigisBoxBrandFeedItemTest.php index 0d06c5c..72ba23b 100644 --- a/tests/Unit/LuigisBoxBrandFeedItemTest.php +++ b/tests/Unit/LuigisBoxBrandFeedItemTest.php @@ -43,7 +43,7 @@ public function testBrandFeedItemCreation(): void $luigisBoxBrandFeedItemFactory = new LuigisBoxBrandFeedItemFactory($friendlyUrlFacadeMock, $imageFacadeMock); $luigisBoxBrandFeedItem = $luigisBoxBrandFeedItemFactory->create($brand, $defaultDomain); - $this->assertSame(LuigisBoxBrandFeedItem::UNIQUE_IDENTIFIER_PREFIX . self::BRAND_ID, $luigisBoxBrandFeedItem->getIdentity()); + $this->assertSame(LuigisBoxBrandFeedItem::UNIQUE_BRAND_IDENTIFIER_PREFIX . '-' . self::BRAND_ID, $luigisBoxBrandFeedItem->getIdentity()); $this->assertSame(self::BRAND_NAME, $luigisBoxBrandFeedItem->getName()); $this->assertSame(self::BRAND_URL, $luigisBoxBrandFeedItem->getUrl()); $this->assertSame(self::BRAND_IMAGE_URL . '?width=100&height=100', $luigisBoxBrandFeedItem->getImageUrl());