protected function ControllerTest::setUp in Authorization 8
Overrides EntityKernelTestBase::setUp
File
- tests/
src/ Kernel/ ControllerTest.php, line 28
Class
- ControllerTest
- Test description.
Namespace
Drupal\Tests\authorization\KernelCode
protected function setUp() : void {
parent::setUp();
$profile = AuthorizationProfile::create([
'id' => 'test',
'label' => 'Test profile',
'description' => 'Test profile',
'status' => 'true',
'provider' => 'dummy',
'consumer' => 'dummy',
]);
$profile
->setProviderMappings([
[
'query' => 'student',
],
]);
$profile
->setConsumerMappings([
[
'role' => 'student',
],
]);
$profile
->set('synchronization_actions', []);
$profile
->set('synchronization_modes', [
'user_logon',
'user_logon',
]);
$profile
->save();
}