public function testLoadWithDisabledCacheWillCallDecoratedRoute(): void
{ $this->decorated
->
expects(static::
once()) ->
method('load'
) ->
willReturn($this->
createMock(ProductSuggestRouteResponse::
class));
$this->cache
->
expects(static::
never()) ->
method('get'
);
$this->eventDispatcher->
addListener( ProductSuggestRouteCacheKeyEvent::
class,
fn (ProductSuggestRouteCacheKeyEvent
$event) =>
$event->
disableCaching() );
$this->cachedRout->
load(new Request(),
$this->context,
new Criteria());
} public function testLoadWithEnabledCacheWillReturnDataFromCache(): void
{ $this->decorated
->
expects(static::
never()) ->
method('load'
);
$this->cache