function ContentPreprocessTest::routeNodeProvider

Same name and namespace in other branches
  1. 9 core/modules/content_moderation/tests/src/Unit/ContentPreprocessTest.php \Drupal\Tests\content_moderation\Unit\ContentPreprocessTest::routeNodeProvider()
  2. 8.9.x core/modules/content_moderation/tests/src/Unit/ContentPreprocessTest.php \Drupal\Tests\content_moderation\Unit\ContentPreprocessTest::routeNodeProvider()
  3. 11.x core/modules/content_moderation/tests/src/Unit/ContentPreprocessTest.php \Drupal\Tests\content_moderation\Unit\ContentPreprocessTest::routeNodeProvider()

Data provider for
@dataProvider routeNodeProvider" class="local">self::testIsLatestVersionPage
().

File

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

Class

ContentPreprocessTest
@coversDefaultClass \Drupal\content_moderation\ContentPreprocess[[api-linebreak]]

Namespace

Drupal\Tests\content_moderation\Unit

Code

public static function routeNodeProvider() {
  return [
    [
      'entity.node.canonical',
      1,
      1,
      FALSE,
      'Not on the latest version tab route.',
    ],
    [
      'entity.node.latest_version',
      1,
      1,
      TRUE,
      'On the latest version tab route, with the route node.',
    ],
    [
      'entity.node.latest_version',
      1,
      2,
      FALSE,
      'On the latest version tab route, with a different node.',
    ],
  ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.