function 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\ViewsCode
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.