Drupal 8  8.0.2
FieldPluginBaseTest Class Reference
Inheritance diagram for FieldPluginBaseTest:

Public Member Functions

 testRenderAsLinkWithoutPath ()
 
 testRenderTrimmedWithMoreLink ()
 
 testRenderNoResult ()
 
 testRenderAsLinkWithPathAndOptions ($path, $alter, $link_html, $final_html=NULL)
 
 providerTestRenderAsLinkWithPathAndOptions ()
 
 testRenderAsLinkWithUrlAndOptions (Url $url, $alter, Url $expected_url, $url_path, Url $expected_link_url, $link_html, $final_html=NULL)
 
 providerTestRenderAsLinkWithUrlAndOptions ()
 
 testRenderAsLinkWithPathAndTokens ($path, $tokens, $link_html)
 
 providerTestRenderAsLinkWithPathAndTokens ()
 
 testGetRenderTokensWithoutFieldsAndArguments ()
 
 testGetRenderTokensWithoutArguments ()
 
 testGetRenderTokensWithArguments ()
 
- Public Member Functions inherited from UnitTestCase
 randomMachineName ($length=8)
 
 getConfigFactoryStub (array $configs=array())
 
 getConfigStorageStub (array $configs)
 
 getStringTranslationStub ()
 

Protected Member Functions

 setUp ()
 
 setUpUrlIntegrationServices ()
 
 setupDisplayWithEmptyArgumentsAndFields ()
 
- Protected Member Functions inherited from UnitTestCase
 setUp ()
 
 getRandomGenerator ()
 
 assertArrayEquals (array $expected, array $actual, $message=NULL)
 
 getBlockMockWithMachineName ($machine_name)
 
 getContainerWithCacheTagsInvalidator (CacheTagsInvalidatorInterface $cache_tags_validator)
 
 getClassResolverStub ()
 

Protected Attributes

 $configuration = []
 
 $pluginId = 'field_test'
 
 $pluginDefinition = []
 
 $defaultUrlOptions
 
 $linkGenerator
 
 $executable
 
 $display
 
 $urlGenerator
 
 $pathValidator
 
 $unroutedUrlAssembler
 
 $requestStack
 
 $pathProcessor
 
 $renderer
 
- Protected Attributes inherited from UnitTestCase
 $randomGenerator
 
 $root
 

Detailed Description

views

Member Function Documentation

providerTestRenderAsLinkWithPathAndOptions ( )

Data provider for ::testRenderAsLinkWithPathAndOptions().

Returns
array Test data.
providerTestRenderAsLinkWithPathAndTokens ( )

Data provider for ::testRenderAsLinkWithPathAndTokens().

Returns
array Test data.
providerTestRenderAsLinkWithUrlAndOptions ( )

Data provider for ::testRenderAsLinkWithUrlAndOptions().

Returns
array Array of test data.

References Url\fromRoute().

Here is the call graph for this function:

setUp ( )
protected

{}

References Drupal\linkGenerator(), Drupal\pathValidator(), Drupal\requestStack(), Drupal\setContainer(), and Drupal\urlGenerator().

Here is the call graph for this function:

setupDisplayWithEmptyArgumentsAndFields ( )
protected

Sets up a display with empty arguments and fields.

Referenced by FieldPluginBaseTest\testRenderAsLinkWithPathAndOptions(), FieldPluginBaseTest\testRenderAsLinkWithPathAndTokens(), FieldPluginBaseTest\testRenderAsLinkWithUrlAndOptions(), and FieldPluginBaseTest\testRenderNoResult().

Here is the caller graph for this function:

setUpUrlIntegrationServices ( )
protected

Sets up the unrouted url assembler and the link generator.

References Drupal\getContainer(), Drupal\linkGenerator(), Drupal\requestStack(), and Drupal\urlGenerator().

Referenced by FieldPluginBaseTest\testRenderAsLinkWithoutPath(), FieldPluginBaseTest\testRenderAsLinkWithPathAndOptions(), FieldPluginBaseTest\testRenderAsLinkWithPathAndTokens(), FieldPluginBaseTest\testRenderAsLinkWithUrlAndOptions(), and FieldPluginBaseTest\testRenderTrimmedWithMoreLink().

Here is the call graph for this function:

Here is the caller graph for this function:

testGetRenderTokensWithArguments ( )

::getRenderTokens

testGetRenderTokensWithoutArguments ( )

::getRenderTokens

testGetRenderTokensWithoutFieldsAndArguments ( )

::getRenderTokens

testRenderAsLinkWithoutPath ( )

Test rendering as a link without a path.

::renderAsLink

References FieldPluginBaseTest\setUpUrlIntegrationServices().

Here is the call graph for this function:

testRenderAsLinkWithPathAndOptions (   $path,
  $alter,
  $link_html,
  $final_html = NULL 
)

Test rendering of a link with a path and options.

providerTestRenderAsLinkWithPathAndOptions ::renderAsLink

References FieldPluginBaseTest\setupDisplayWithEmptyArgumentsAndFields(), and FieldPluginBaseTest\setUpUrlIntegrationServices().

Here is the call graph for this function:

testRenderAsLinkWithPathAndTokens (   $path,
  $tokens,
  $link_html 
)

Test rendering of a link with a path and options.

providerTestRenderAsLinkWithPathAndTokens ::renderAsLink

References FieldPluginBaseTest\setupDisplayWithEmptyArgumentsAndFields(), and FieldPluginBaseTest\setUpUrlIntegrationServices().

Here is the call graph for this function:

testRenderAsLinkWithUrlAndOptions ( Url  $url,
  $alter,
Url  $expected_url,
  $url_path,
Url  $expected_link_url,
  $link_html,
  $final_html = NULL 
)

Tests link rendering with a URL and options.

providerTestRenderAsLinkWithUrlAndOptions ::renderAsLink

References Url\getOptions(), Url\getRouteName(), Url\getRouteParameters(), Url\setOptions(), FieldPluginBaseTest\setupDisplayWithEmptyArgumentsAndFields(), FieldPluginBaseTest\setUpUrlIntegrationServices(), Url\setUrlGenerator(), and Drupal\urlGenerator().

Here is the call graph for this function:

testRenderNoResult ( )

Tests the "No results text" rendering.

::renderText

References FieldPluginBaseTest\setupDisplayWithEmptyArgumentsAndFields().

Here is the call graph for this function:

testRenderTrimmedWithMoreLink ( )

Test rendering as a link without a path.

::renderText

References FieldPluginBaseTest\setUpUrlIntegrationServices().

Here is the call graph for this function:

Field Documentation

$defaultUrlOptions
protected
Initial value:
= [
'absolute' => FALSE

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