Skip to content

Commit

Permalink
all Luigi's Box searches can now be run independently of each other
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasLudvik committed Mar 12, 2024
1 parent f80145b commit 46a5958
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Model/LuigisBoxBrandFeedItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

class LuigisBoxBrandFeedItem implements FeedItemInterface
{
public const UNIQUE_IDENTIFIER_PREFIX = 'brand-';
public const UNIQUE_BRAND_IDENTIFIER_PREFIX = 'brand';

/**
* @param int $id
Expand Down Expand Up @@ -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;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/LuigisBoxBrandFeedItemTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 46a5958

Please sign in to comment.