You are here

public function PathAliasTest::buildLinkProvider in Freelinking 4.0.x

Same name and namespace in other branches
  1. 8.3 tests/src/Unit/Plugin/freelinking/PathAliasTest.php \Drupal\Tests\freelinking\Unit\Plugin\freelinking\PathAliasTest::buildLinkProvider()

Provider test parameters for ::testBuildLink.

Return value

array An array of test parameters.

File

tests/src/Unit/Plugin/freelinking/PathAliasTest.php, line 179

Class

PathAliasTest
Tests the path_alias plugin.

Namespace

Drupal\Tests\freelinking\Unit\Plugin\freelinking

Code

public function buildLinkProvider() {
  $validExpected = [
    '#type' => 'link',
    '#title' => 'A valid path alias',
  ];
  $invalidExpected = [
    '#theme' => 'freelink_error',
    '#plugin' => 'path_alias',
  ];
  return [
    [
      'validalias',
      $validExpected,
    ],
    [
      'invalidalias',
      $invalidExpected,
    ],
  ];
}