You are here

public function ContentPreprocessTest::testIsLatestVersionPage in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/content_moderation/tests/src/Unit/ContentPreprocessTest.php \Drupal\Tests\content_moderation\Unit\ContentPreprocessTest::testIsLatestVersionPage()

@covers ::isLatestVersionPage @dataProvider routeNodeProvider

File

core/modules/content_moderation/tests/src/Unit/ContentPreprocessTest.php, line 21

Class

ContentPreprocessTest
@coversDefaultClass \Drupal\content_moderation\ContentPreprocess

Namespace

Drupal\Tests\content_moderation\Unit

Code

public function testIsLatestVersionPage($route_name, $route_nid, $check_nid, $result, $message) {
  $content_preprocess = new ContentPreprocess($this
    ->setupCurrentRouteMatch($route_name, $route_nid));
  $node = $this
    ->setupNode($check_nid);
  $this
    ->assertEquals($result, $content_preprocess
    ->isLatestVersionPage($node), $message);
}