protected function KeyTestTrait::createTestKeyConfigOverride in Key 8
Make a key configuration override for testing operations.
3 calls to KeyTestTrait::createTestKeyConfigOverride()
- KeyAdminTest::testAdminUserRoutes in tests/
src/ Functional/ KeyAdminTest.php - Tests key routes for an authorized user.
- KeyNonAdminAccessTest::setUp in tests/
src/ Functional/ KeyNonAdminAccessTest.php - KeyOverrideAdminTest::setUp in tests/
src/ Functional/ KeyOverrideAdminTest.php
File
- tests/
src/ Functional/ KeyTestTrait.php, line 63
Class
- KeyTestTrait
- Used for key access tests.
Namespace
Drupal\Tests\key\FunctionalCode
protected function createTestKeyConfigOverride($override_id, $key_id) {
$this->testKeyConfigOverride = KeyConfigOverride::create([
'id' => $override_id,
'label' => 'Test key configuration override',
'config_type' => 'system.simple',
'config_prefix' => '',
'config_name' => 'system.site',
'config_item' => 'name',
'key_id' => $key_id,
]);
$this->testKeyConfigOverride
->save();
}