public function PreviewLinkEntityTest::testGetEntities in Preview Link 2.0.x
Same name and namespace in other branches
- 2.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\KernelCode
public function testGetEntities() : void {
$previewLink = PreviewLink::create();
$entity = EntityTestRevPub::create();
$previewLink->entities = [
$entity,
];
$this
->assertCount(1, $previewLink
->getEntities());
}