You are here

public function PathautoTokenTest::mapTokenNames in Pathauto 8

1 call to PathautoTokenTest::mapTokenNames()
PathautoTokenTest::assertTokens in tests/src/Kernel/PathautoTokenTest.php
Function copied from TokenTestHelper::assertTokens().

File

tests/src/Kernel/PathautoTokenTest.php, line 107

Class

PathautoTokenTest
Tests tokens provided by Pathauto.

Namespace

Drupal\Tests\pathauto\Kernel

Code

public function mapTokenNames($type, array $tokens = []) {
  $return = [];
  foreach ($tokens as $token) {
    $return[$token] = "[{$type}:{$token}]";
  }
  return $return;
}