51 calls to Cache::mergeContexts() in Drupal 10
- AssertPageCacheContextsAndTagsTrait::assertCacheContexts in core/
modules/ system/ tests/ src/ Functional/ Cache/ AssertPageCacheContextsAndTagsTrait.php - Ensures that some cache contexts are present in the current response.
- AssertViewsCacheTagsTrait::assertViewsCacheTags in core/
modules/ views/ src/ Tests/ AssertViewsCacheTagsTrait.php - Asserts a view's result & render cache items' cache tags.
- AssertViewsCacheTagsTrait::assertViewsCacheTagsFromStaticRenderArray in core/
modules/ views/ src/ Tests/ AssertViewsCacheTagsTrait.php - Asserts a view's result & render cache items' cache tags.
- BlockContentCacheTagsTest::testBlock in core/
modules/ block_content/ tests/ src/ Functional/ BlockContentCacheTagsTest.php - Tests that the block is cached with the correct contexts and tags.
- BlockContentResourceTestBase::getExpectedCacheContexts in core/
modules/ block_content/ tests/ src/ Functional/ Rest/ BlockContentResourceTestBase.php - The expected cache contexts for the GET/HEAD response of the test entity.
- BlockContentTest::getExpectedCacheContexts in core/
modules/ jsonapi/ tests/ src/ Functional/ BlockContentTest.php - BlockViewBuilder::viewMultiple in core/
modules/ block/ src/ BlockViewBuilder.php - Builds the render array for the provided entities.
- BlockViewBuilderTest::assertBlockRenderedWithExpectedCacheability in core/
modules/ block/ tests/ src/ Kernel/ BlockViewBuilderTest.php - Asserts that a block is built/rendered/cached with expected cacheability.
- BlockViewBuilderTest::testBlockViewBuilderBuildAlter in core/
modules/ block/ tests/ src/ Kernel/ BlockViewBuilderTest.php - Tests block build altering.
- BookNavigationBlock::getCacheContexts in core/
modules/ book/ src/ Plugin/ Block/ BookNavigationBlock.php - CacheableMetadata::merge in core/
lib/ Drupal/ Core/ Cache/ CacheableMetadata.php - Merges the values of another CacheableMetadata object with this one.
- CacheTagTest::getRenderCache in core/
modules/ views/ tests/ src/ Functional/ Plugin/ CacheTagTest.php - Gets the render cache for a given view.
- CacheTest::testMergeCacheContexts in core/
tests/ Drupal/ Tests/ Core/ Cache/ CacheTest.php - @covers ::mergeContexts
- CommentResourceTestBase::getExpectedCacheContexts in core/
modules/ comment/ tests/ src/ Functional/ Rest/ CommentResourceTestBase.php - CommentTest::getExpectedCacheContexts in core/
modules/ jsonapi/ tests/ src/ Functional/ CommentTest.php - ConfigurableLanguageResourceTestBase::getExpectedCacheContexts in core/
modules/ language/ tests/ src/ Functional/ Rest/ ConfigurableLanguageResourceTestBase.php - ConfigurableLanguageTest::getExpectedCacheContexts in core/
modules/ jsonapi/ tests/ src/ Functional/ ConfigurableLanguageTest.php - ContentLanguageSettingsTest::getExpectedCacheContexts in core/
modules/ jsonapi/ tests/ src/ Functional/ ContentLanguageSettingsTest.php - ContentTranslationUITestBase::doTestBasicTranslation in core/
modules/ content_translation/ tests/ src/ Functional/ ContentTranslationUITestBase.php - Tests the basic translation workflow.
- ContextAwarePluginTrait::getCacheContexts in core/
lib/ Drupal/ Core/ Plugin/ ContextAwarePluginTrait.php - EntityCacheTagsTestBase::testReferencedEntity in core/
modules/ system/ tests/ src/ Functional/ Entity/ EntityCacheTagsTestBase.php - Tests cache tags presence and invalidation of the entity when referenced.
- EntityTestComputedFieldNormalizerTest::getExpectedCacheContexts in core/
modules/ system/ tests/ modules/ entity_test/ tests/ src/ Functional/ Rest/ EntityTestComputedFieldNormalizerTest.php - EntityTestComputedFieldTest::getExpectedCacheContexts in core/
modules/ jsonapi/ tests/ src/ Functional/ EntityTestComputedFieldTest.php - EntityTestJsonInternalPropertyNormalizerTest::getExpectedCacheContexts in core/
modules/ system/ tests/ modules/ entity_test/ tests/ src/ Functional/ Rest/ EntityTestJsonInternalPropertyNormalizerTest.php - EntityTestTextItemNormalizerTest::getExpectedCacheContexts in core/
modules/ system/ tests/ modules/ entity_test/ tests/ src/ Functional/ Rest/ EntityTestTextItemNormalizerTest.php - EntityWithUriCacheTagsTestBase::testEntityUri in core/
modules/ system/ tests/ src/ Functional/ Entity/ EntityWithUriCacheTagsTestBase.php - Tests cache tags presence and invalidation of the entity at its URI.
- ExposedFormPluginBase::getCacheContexts in core/
modules/ views/ src/ Plugin/ views/ exposed_form/ ExposedFormPluginBase.php - The cache contexts associated with this object.
- ForumBlockBase::getCacheContexts in core/
modules/ forum/ src/ Plugin/ Block/ ForumBlockBase.php - FrontPageTest::doTestFrontPageViewCacheTags in core/
modules/ node/ tests/ src/ Functional/ Views/ FrontPageTest.php - Tests the cache tags on the front page.
- HelpBlock::getCacheContexts in core/
modules/ help/ src/ Plugin/ Block/ HelpBlock.php - HtmlRenderer::renderResponse in core/
lib/ Drupal/ Core/ Render/ MainContent/ HtmlRenderer.php - The entire HTML: takes a #type 'page' and wraps it in a #type 'html'.
- ModerationStateFilter::getCacheContexts in core/
modules/ content_moderation/ src/ Plugin/ views/ filter/ ModerationStateFilter.php - The cache contexts associated with this object.
- NodeTest::testGetIndividual in core/
modules/ jsonapi/ tests/ src/ Functional/ NodeTest.php - RefinableCacheableDependencyTrait::addCacheContexts in core/
lib/ Drupal/ Core/ Cache/ RefinableCacheableDependencyTrait.php - Renderer::doRender in core/
lib/ Drupal/ Core/ Render/ Renderer.php - See the docs for ::render().
- ResourceResponseTestTrait::getEmptyCollectionResponse in core/
modules/ jsonapi/ tests/ src/ Functional/ ResourceResponseTestTrait.php - Gets a generic empty collection response.
- ResourceTestBase::getExpectedCacheContexts in core/
modules/ jsonapi/ tests/ src/ Functional/ ResourceTestBase.php - The expected cache contexts for the GET/HEAD response of the test entity.
- ResourceTestBase::getExpectedCollectionCacheability in core/
modules/ jsonapi/ tests/ src/ Functional/ ResourceTestBase.php - Computes the cacheability for a given entity collection.
- ResourceTestBase::getExpectedRelatedResponse in core/
modules/ jsonapi/ tests/ src/ Functional/ ResourceTestBase.php - Builds an expected related ResourceResponse for the given field.
- RouterTest::testFinishResponseSubscriber in core/
modules/ system/ tests/ src/ Functional/ Routing/ RouterTest.php - Confirms that our FinishResponseSubscriber logic works properly.
- SortRandomTest::testRandomOrderingWithRenderCaching in core/
modules/ views/ tests/ src/ Kernel/ Handler/ SortRandomTest.php - Tests random ordering with tags based caching.
- StatisticsReportsTest::testPopularContentBlock in core/
modules/ statistics/ tests/ src/ Functional/ StatisticsReportsTest.php - Tests the "popular content" block.
- StyleSerializerTest::testRestRenderCaching in core/
modules/ rest/ tests/ src/ Functional/ Views/ StyleSerializerTest.php - Tests REST export with views render caching enabled.
- SystemMenuBlock::getCacheContexts in core/
modules/ system/ src/ Plugin/ Block/ SystemMenuBlock.php - TermResourceTestBase::getExpectedCacheContexts in core/
modules/ taxonomy/ tests/ src/ Functional/ Rest/ TermResourceTestBase.php - The expected cache contexts for the GET/HEAD response of the test entity.
- TermTest::getExpectedCacheContexts in core/
modules/ jsonapi/ tests/ src/ Functional/ TermTest.php - ToolbarCacheContextsTest::assertToolbarCacheContexts in core/
modules/ toolbar/ tests/ src/ Functional/ ToolbarCacheContextsTest.php - Tests that cache contexts are applied for both users.
- UrlTest::testLinkBubbleableMetadata in core/
modules/ system/ tests/ src/ Kernel/ Common/ UrlTest.php - Tests that #type=link bubbles outbound route/path processors' metadata.
- UserTest::getExpectedCacheContexts in core/
modules/ jsonapi/ tests/ src/ Functional/ UserTest.php - View::addCacheMetadata in core/
modules/ views/ src/ Entity/ View.php - Fills in the cache metadata of this view.
- ViewsExposedFilterBlock::getCacheContexts in core/
modules/ views/ src/ Plugin/ Block/ ViewsExposedFilterBlock.php