Drupal 8  8.0.2
TimestampFormatterTest Class Reference
Inheritance diagram for TimestampFormatterTest:

Static Public Attributes

static $modules = ['system', 'field', 'text', 'entity_test', 'user']
 

Protected Member Functions

 setUp ()
 
 renderEntityFields (FieldableEntityInterface $entity, EntityViewDisplayInterface $display)
 
 testTimestampFormatter ()
 
 testTimestampAgoFormatter ()
 

Protected Attributes

 $entityType
 
 $bundle
 
 $fieldName
 
 $display
 

Detailed Description

Tests the timestamp formatters.

field

Member Function Documentation

renderEntityFields ( FieldableEntityInterface  $entity,
EntityViewDisplayInterface  $display 
)
protected

Renders fields of a given entity with a given display.

Parameters
\Drupal\Core\Entity\FieldableEntityInterface$entityThe entity object with attached fields to render.
\Drupal\Core\Entity\Display\EntityViewDisplayInterface$displayThe display to render the fields in.
Returns
string The rendered entity fields.

References EntityViewDisplayInterface\build().

Referenced by TimestampFormatterTest\testTimestampFormatter().

Here is the call graph for this function:

Here is the caller graph for this function:

setUp ( )
protected

{}

References Entity\create(), and Unicode\strtolower().

Here is the call graph for this function:

testTimestampAgoFormatter ( )
protected

Tests TimestampAgoFormatter.

References Entity\create(), SafeMarkup\format(), Drupal\requestStack(), and Drupal\service().

Here is the call graph for this function:

testTimestampFormatter ( )
protected

Tests TimestampFormatter.

References Entity\create(), Drupal\entityManager(), TimestampFormatterTest\renderEntityFields(), and Drupal\service().

Here is the call graph for this function:

Field Documentation

$modules = ['system', 'field', 'text', 'entity_test', 'user']
static

{}


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