Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / user / src / Tests / Views / UserChangedTest.php
1 <?php
2
3 namespace Drupal\user\Tests\Views;
4
5 use Drupal\views\Tests\ViewTestBase;
6 use Drupal\views\Tests\ViewTestData;
7
8 /**
9  * Tests the changed field.
10  *
11  * @group user
12  */
13 class UserChangedTest extends ViewTestBase {
14
15   /**
16    * Modules to enable.
17    *
18    * @var array
19    */
20   public static $modules = ['views_ui', 'user_test_views'];
21
22   /**
23    * Views used by this test.
24    *
25    * @var array
26    */
27   public static $testViews = ['test_user_changed'];
28
29   protected function setUp() {
30     parent::setUp();
31
32     ViewTestData::createTestViews(get_class($this), ['user_test_views']);
33
34     $this->enableViewsTestModule();
35   }
36
37   /**
38    * Tests changed field.
39    */
40   public function testChangedField() {
41     $path = 'test_user_changed';
42
43     $options = [];
44
45     $this->drupalGet($path, $options);
46
47     $this->assertText(t('Updated date') . ': ' . date('Y-m-d', REQUEST_TIME));
48   }
49
50 }