function UserViewsDataTest::testUserPasswordFieldNotAvailableToViews

Same name in other branches
  1. 9 core/modules/user/tests/src/Kernel/Views/UserViewsDataTest.php \Drupal\Tests\user\Kernel\Views\UserViewsDataTest::testUserPasswordFieldNotAvailableToViews()
  2. 10 core/modules/user/tests/src/Kernel/Views/UserViewsDataTest.php \Drupal\Tests\user\Kernel\Views\UserViewsDataTest::testUserPasswordFieldNotAvailableToViews()

Tests if user views data object doesn't contain pass field.

File

core/modules/user/tests/src/Kernel/Views/UserViewsDataTest.php, line 53

Class

UserViewsDataTest
Contains tests related to the views data for the user entity type.

Namespace

Drupal\Tests\user\Kernel\Views

Code

public function testUserPasswordFieldNotAvailableToViews() : void {
    $field_definitions = $this->entityFieldManager
        ->getBaseFieldDefinitions('user');
    $this->assertArrayHasKey('pass', $field_definitions);
    $this->assertArrayNotHasKey('pass', $this->viewsData
        ->get('users_field_data'));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.