Updated all the contrib modules to their latest versions.
[yaffs-website] / web / modules / contrib / token / tests / src / Kernel / DateTest.php
1 <?php
2
3 namespace Drupal\Tests\token\Kernel;
4
5 /**
6  * Tests date tokens.
7  *
8  * @group token
9  */
10 class DateTest extends KernelTestBase {
11
12   /**
13    * Modules to enable.
14    *
15    * @var array
16    */
17   public static $modules = [];
18
19   /**
20    * {@inheritdoc}
21    */
22   protected function setUp() {
23     parent::setUp();
24     $this->installConfig(['system', 'token_module_test']);
25   }
26
27   function testDateTokens() {
28     $tokens = [
29       'token_module_test' => '1984',
30       'invalid_format' => NULL,
31     ];
32
33     $this->assertTokens('date', ['date' => 453859200], $tokens);
34   }
35
36 }