function TokenTestTrait::mapTokenNames in Token 8
2 calls to TokenTestTrait::mapTokenNames()
- TokenTestTrait::assertNoTokens in tests/
src/ Functional/ TokenTestTrait.php - TokenTestTrait::assertTokens in tests/
src/ Functional/ TokenTestTrait.php
File
- tests/
src/ Functional/ TokenTestTrait.php, line 44
Class
- TokenTestTrait
- Helper test trait with some added functions for testing.
Namespace
Drupal\Tests\token\FunctionalCode
function mapTokenNames($type, array $tokens = []) {
$return = [];
foreach ($tokens as $token) {
$return[$token] = "[{$type}:{$token}]";
}
return $return;
}