You are here

public function PreviewLinkEntityTest::testGetEntities in Preview Link 2.x

Same name and namespace in other branches
  1. 2.0.x tests/src/Kernel/PreviewLinkEntityTest.php \Drupal\Tests\preview_link\Kernel\PreviewLinkEntityTest::testGetEntities()

Tests getting entities.

@covers ::getEntities

File

tests/src/Kernel/PreviewLinkEntityTest.php, line 32

Class

PreviewLinkEntityTest
Preview link session test.

Namespace

Drupal\Tests\preview_link\Kernel

Code

public function testGetEntities() : void {
  $previewLink = PreviewLink::create();
  $entity = EntityTestRevPub::create();
  $previewLink->entities = [
    $entity,
  ];
  $this
    ->assertCount(1, $previewLink
    ->getEntities());
}