* Test invalid tokens.
*/
public function testGetInvalidTokens() {
- $tests = array();
- $tests[] = array(
- 'valid tokens' => array(
+ $tests = [];
+ $tests[] = [
+ 'valid tokens' => [
'[node:title]',
'[node:created:short]',
'[node:created:custom:invalid]',
'[current-date:short]',
'[current-user:uid]',
'[current-user:ip-address]',
- ),
- 'invalid tokens' => array(
+ ],
+ 'invalid tokens' => [
'[node:title:invalid]',
'[node:created:invalid]',
'[node:created:short:invalid]',
'[node:type]',
'[node:type-name]',
'[date:short]',
- ),
- 'types' => array('node'),
- );
- $tests[] = array(
- 'valid tokens' => array(
+ ],
+ 'types' => ['node'],
+ ];
+ $tests[] = [
+ 'valid tokens' => [
'[node:title]',
'[node:created:short]',
'[node:created:custom:invalid]',
'[user:uid]',
'[current-date:short]',
'[current-user:uid]',
- ),
- 'invalid tokens' => array(
+ ],
+ 'invalid tokens' => [
'[node:title:invalid]',
'[node:created:invalid]',
'[node:created:short:invalid]',
'[node:tnid]',
'[node:type]',
'[node:type-name]',
- ),
- 'types' => array('all'),
- );
+ ],
+ 'types' => ['all'],
+ ];
foreach ($tests as $test) {
$tokens = array_merge($test['valid tokens'], $test['invalid tokens']);
$this->assertNull($this->tokenService->getTokenInfo('user_role', 'url'));
$this->assertNull($this->tokenService->getTypeInfo('user_role'));
}
+
}