Drupal 8  8.0.2
RendererBubblingTest Class Reference
Inheritance diagram for RendererBubblingTest:

Public Member Functions

 testBubblingWithoutPreRender ()
 
 testContextBubblingCustomCacheBin ()
 
 testContextBubblingEdgeCases (array $element, array $expected_top_level_contexts, array $expected_cache_items)
 
 providerTestContextBubblingEdgeCases ()
 
 testConditionalCacheContextBubblingSelfHealing ()
 
 testBubblingWithPrerender ($test_element)
 
 providerTestBubblingWithPrerender ()
 
 testOverWriteCacheKeys ()
 
- Public Member Functions inherited from UnitTestCase
 randomMachineName ($length=8)
 
 getConfigFactoryStub (array $configs=array())
 
 getConfigStorageStub (array $configs)
 
 getStringTranslationStub ()
 

Protected Member Functions

 setUp ()
 
- Protected Member Functions inherited from RendererTestBase
 setUp ()
 
 randomContextValue ()
 
 setUpUnusedCache ()
 
 setupMemoryCache ()
 
 setUpRequest ($method= 'GET')
 
 assertRenderCacheItem ($cid, $data, $bin= 'render')
 
- Protected Member Functions inherited from UnitTestCase
 setUp ()
 
 getRandomGenerator ()
 
 assertArrayEquals (array $expected, array $actual, $message=NULL)
 
 getBlockMockWithMachineName ($machine_name)
 
 getContainerWithCacheTagsInvalidator (CacheTagsInvalidatorInterface $cache_tags_validator)
 
 getClassResolverStub ()
 

Additional Inherited Members

- Protected Attributes inherited from RendererTestBase
 $renderer
 
 $renderCache
 
 $placeholderGenerator
 
 $requestStack
 
 $cacheFactory
 
 $cacheContexts
 
 $controllerResolver
 
 $themeManager
 
 $elementInfo
 
 $memoryCache
 
 $currentUserRole
 
 $rendererConfig
 
- Protected Attributes inherited from UnitTestCase
 $randomGenerator
 
 $root
 

Detailed Description

Render

Member Function Documentation

providerTestBubblingWithPrerender ( )

Provides two test elements: one without, and one with the theme system.

Returns
array
setUp ( )
protected

{}

testBubblingWithoutPreRender ( )

Tests bubbling of assets when NOT using #pre_render callbacks.

References RendererTestBase\setupMemoryCache(), and RendererTestBase\setUpRequest().

Here is the call graph for this function:

testBubblingWithPrerender (   $test_element)

Tests bubbling of bubbleable metadata added by #pre_render callbacks.

providerTestBubblingWithPrerender

References Drupal\getContainer(), RendererTestBase\setupMemoryCache(), RendererTestBase\setUpRequest(), and Drupal\state().

Here is the call graph for this function:

testConditionalCacheContextBubblingSelfHealing ( )

Tests the self-healing of the redirect with conditional cache contexts.

References RendererTestBase\assertRenderCacheItem(), Cache\PERMANENT, RendererTestBase\setupMemoryCache(), and RendererTestBase\setUpRequest().

Here is the call graph for this function:

testContextBubblingCustomCacheBin ( )

Tests cache context bubbling with a custom cache bin.

References RendererTestBase\assertRenderCacheItem(), UnitTestCase\randomMachineName(), and RendererTestBase\setUpRequest().

Here is the call graph for this function:

testContextBubblingEdgeCases ( array  $element,
array  $expected_top_level_contexts,
array  $expected_cache_items 
)

Tests cache context bubbling in edge cases, because it affects the CID.

::testBubblingWithPrerender() already tests the common case.

providerTestContextBubblingEdgeCases

References RendererTestBase\assertRenderCacheItem(), RendererTestBase\setupMemoryCache(), and RendererTestBase\setUpRequest().

Here is the call graph for this function:

testOverWriteCacheKeys ( )

Tests that an element's cache keys cannot be changed during its rendering.

Cache keys may not be changed after initial setup. Use the contexts property instead to bubble additional metadata.

References RendererTestBase\setupMemoryCache(), and RendererTestBase\setUpRequest().

Here is the call graph for this function:


The documentation for this class was generated from the following file: