You are here

protected function PreviewLinkStorageTest::assertPreviewLinkEqual in Preview Link 8

Ensure two preview links are the same.

Parameters

\Drupal\preview_link\Entity\PreviewLinkInterface $preview_link1: The first preview link.

\Drupal\preview_link\Entity\PreviewLinkInterface $preview_link2: The second preview link.

1 call to PreviewLinkStorageTest::assertPreviewLinkEqual()
PreviewLinkStorageTest::testGetPreviewLink in tests/src/Kernel/PreviewLinkStorageTest.php
Test retrieving a preview link.

File

tests/src/Kernel/PreviewLinkStorageTest.php, line 89

Class

PreviewLinkStorageTest
Preview link form test.

Namespace

Drupal\Tests\preview_link\Kernel

Code

protected function assertPreviewLinkEqual(PreviewLinkInterface $preview_link1, PreviewLinkInterface $preview_link2) {
  $this
    ->assertEquals($preview_link1
    ->getToken(), $preview_link2
    ->getToken());
  $this
    ->assertEquals($preview_link1
    ->getUrl(), $preview_link2
    ->getUrl());
}