You are here

protected function UserRegistrationTest::assertRegistrationFormCacheTagsWithUserFields in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/user/tests/src/Functional/UserRegistrationTest.php \Drupal\Tests\user\Functional\UserRegistrationTest::assertRegistrationFormCacheTagsWithUserFields()
  2. 10 core/modules/user/tests/src/Functional/UserRegistrationTest.php \Drupal\Tests\user\Functional\UserRegistrationTest::assertRegistrationFormCacheTagsWithUserFields()

Asserts the presence of cache tags on registration form with user fields.

1 call to UserRegistrationTest::assertRegistrationFormCacheTagsWithUserFields()
UserRegistrationTest::testRegistrationWithUserFields in core/modules/user/tests/src/Functional/UserRegistrationTest.php
Tests Field API fields on user registration forms.

File

core/modules/user/tests/src/Functional/UserRegistrationTest.php, line 401

Class

UserRegistrationTest
Tests registration of user under different configurations.

Namespace

Drupal\Tests\user\Functional

Code

protected function assertRegistrationFormCacheTagsWithUserFields() {
  $this
    ->assertSession()
    ->responseHeaderContains('X-Drupal-Cache-Tags', 'config:core.entity_form_display.user.user.register');
  $this
    ->assertSession()
    ->responseHeaderContains('X-Drupal-Cache-Tags', 'config:field.field.user.user.test_user_field');
  $this
    ->assertSession()
    ->responseHeaderContains('X-Drupal-Cache-Tags', 'config:field.storage.user.test_user_field');
  $this
    ->assertSession()
    ->responseHeaderContains('X-Drupal-Cache-Tags', 'config:user.settings');
}