public function MetatagSettingsTest::testMetatagSettings in Metatag 8
Tests the Metatag settings.
File
- tests/
src/ Kernel/ MetatagSettingsTest.php, line 54
Class
- MetatagSettingsTest
- Test the Metatag settings.
Namespace
Drupal\Tests\metatag\KernelCode
public function testMetatagSettings() {
$metatag_groups = $this->metatagManager
->sortedGroups();
$config = $this->configFactory
->getEditable('metatag.settings');
$group = reset($metatag_groups);
$group_id = $group['id'];
$value = [];
$value['user']['user'][$group_id] = $group_id;
$config
->set('entity_type_groups', $value)
->save();
$this
->assertSame($value, $config
->get('entity_type_groups'));
}