You are here

private function Update360Test::getCompactDisplay in Lightning Core 8.5

Returns the 'compact' entity view display for user accounts.

Return value

\Drupal\Core\Entity\Display\EntityViewDisplayInterface The 'compact' entity view display.

1 call to Update360Test::getCompactDisplay()
Update360Test::testUpdate in tests/src/Kernel/Update/Update360Test.php
Tests optional updates targeting Lightning Core 3.6.0.

File

tests/src/Kernel/Update/Update360Test.php, line 64

Class

Update360Test
Tests optional updates targeting Lightning Core 3.6.0.

Namespace

Drupal\Tests\lightning_core\Kernel\Update

Code

private function getCompactDisplay() {

  // Since the update installs a module, the container will be rebuilt. We
  // need to access the container through the kernel, which guarantees we will
  // always get the most up-to-date container.
  return $this->container
    ->get('kernel')
    ->getContainer()
    ->get('entity_display.repository')
    ->getViewDisplay('user', 'user', 'compact');
}