This repository has been archived on 2025-09-29. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
drupalcampbristol/web/modules/contrib/token/tests/src/Kernel/DateTest.php
2017-05-22 15:12:47 +01:00

35 lines
575 B
PHP

<?php
namespace Drupal\Tests\token\Kernel;
/**
* Tests date tokens.
*
* @group token
*/
class DateTest extends KernelTestBase {
/**
* Modules to enable.
*
* @var array
*/
public static $modules = [];
/**
* {@inheritdoc}
*/
protected function setUp() {
parent::setUp();
$this->installConfig(['system', 'token_module_test']);
}
function testDateTokens() {
$tokens = array(
'token_module_test' => '1984',
'invalid_format' => NULL,
);
$this->assertTokens('date', array('date' => 453859200), $tokens);
}
}