public function OpenIDConnectTest::testUserPropertiesIgnore in OpenID Connect / OAuth client 2.x
Same name and namespace in other branches
- 8 tests/src/Unit/OpenIDConnectTest.php \Drupal\Tests\openid_connect\Unit\OpenIDConnectTest::testUserPropertiesIgnore()
Test for the userPropertiesIgnore method.
File
- tests/
src/ Unit/ OpenIDConnectTest.php, line 259
Class
- OpenIDConnectTest
- Provides tests for the OpenID Connect module.
Namespace
Drupal\Tests\openid_connect\UnitCode
public function testUserPropertiesIgnore() : void {
$defaultPropertiesIgnore = [
'uid',
'uuid',
'langcode',
'preferred_langcode',
'preferred_admin_langcode',
'name',
'pass',
'mail',
'status',
'created',
'changed',
'access',
'login',
'init',
'roles',
'default_langcode',
];
$expectedResults = array_combine($defaultPropertiesIgnore, $defaultPropertiesIgnore);
$this->moduleHandler
->expects($this
->once())
->method('alter')
->with('openid_connect_user_properties_ignore', $defaultPropertiesIgnore, []);
$actualPropertiesIgnored = $this->openIdConnect
->userPropertiesIgnore([]);
$this
->assertEquals($expectedResults, $actualPropertiesIgnored);
}