You are here

protected function TrackingLinkFormatterTest::renderEntityFields in Commerce Shipping 8.2

Renders fields of a given entity with a given display.

Parameters

\Drupal\Core\Entity\FieldableEntityInterface $entity: The entity object with attached fields to render.

\Drupal\Core\Entity\Display\EntityViewDisplayInterface $display: The display to render the fields in.

Return value

string The rendered entity fields.

1 call to TrackingLinkFormatterTest::renderEntityFields()
TrackingLinkFormatterTest::testRender in tests/src/Kernel/Formatter/TrackingLinkFormatterTest.php
Tests the rendered output.

File

tests/src/Kernel/Formatter/TrackingLinkFormatterTest.php, line 79

Class

TrackingLinkFormatterTest
Tests the tracking link formatter.

Namespace

Drupal\Tests\commerce_shipping\Kernel\Formatter

Code

protected function renderEntityFields(FieldableEntityInterface $entity, EntityViewDisplayInterface $display) {
  $content = $display
    ->build($entity);
  $content = $this
    ->render($content);
  return $content;
}