You are here

public function WorkbenchPreprocessTest::testIsLatestVersionPage in Workbench Moderation 8

Same name and namespace in other branches
  1. 8.2 tests/src/Unit/WorkbenchPreprocessTest.php \Drupal\Tests\workbench_moderation\Unit\WorkbenchPreprocessTest::testIsLatestVersionPage()

@covers ::isLatestVersionPage @dataProvider routeNodeProvider

File

tests/src/Unit/WorkbenchPreprocessTest.php, line 22

Class

WorkbenchPreprocessTest
Class WorkbenchPreprocessTest.

Namespace

Drupal\Tests\workbench_moderation\Unit

Code

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