public function UserViewsDataTest::testUserPasswordFieldNotAvailableToViews in Drupal 10
Same name and namespace in other branches
- 9 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 51
Class
- UserViewsDataTest
- Contains tests related to the views data for the user entity type.
Namespace
Drupal\Tests\user\Kernel\ViewsCode
public function testUserPasswordFieldNotAvailableToViews() {
$field_definitions = $this->entityFieldManager
->getBaseFieldDefinitions('user');
$this
->assertArrayHasKey('pass', $field_definitions);
$this
->assertArrayNotHasKey('pass', $this->viewsData
->get('users_field_data'));
}