Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions tests/Unit/System/SalesChannel/SalesChannelTypeResolverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,11 @@ public function testItReadsEachSalesChannelOnlyOnce(): void
expectedReads: 1,
));

static::assertSame(SalesChannelTypeClassification::Storefront, $resolver->resolve('storefront-channel'));
static::assertSame(SalesChannelTypeClassification::Storefront, $resolver->resolve('storefront-channel'));
$first = $resolver->resolve('storefront-channel');
$second = $resolver->resolve('storefront-channel');

static::assertSame(SalesChannelTypeClassification::Storefront, $first);
static::assertSame(SalesChannelTypeClassification::Storefront, $second);
static::assertSame(
['storefront-channel' => SalesChannelTypeClassification::Storefront],
$resolver->resolveMany(['storefront-channel', 'storefront-channel']),
Expand All @@ -82,8 +85,11 @@ public function testItRemembersThatASalesChannelIsUnknown(): void
{
$resolver = new SalesChannelTypeResolver($this->repository([], expectedReads: 1));

static::assertSame(SalesChannelTypeClassification::Other, $resolver->resolve('feed-channel'));
static::assertSame(SalesChannelTypeClassification::Other, $resolver->resolve('feed-channel'));
$first = $resolver->resolve('feed-channel');
$second = $resolver->resolve('feed-channel');

static::assertSame(SalesChannelTypeClassification::Other, $first);
static::assertSame(SalesChannelTypeClassification::Other, $second);
}

public function testItReadsOnlyTheIdsItHasNotSeenYet(): void
Expand Down
Loading