You are here

public function ConfigHelperTest::testDelete in Lightning Core 8.3

Same name and namespace in other branches
  1. 8.5 tests/src/Kernel/ConfigHelperTest.php \Drupal\Tests\lightning_core\Kernel\ConfigHelperTest::testDelete()
  2. 8.4 tests/src/Kernel/ConfigHelperTest.php \Drupal\Tests\lightning_core\Kernel\ConfigHelperTest::testDelete()

@covers ::delete

File

tests/src/Kernel/ConfigHelperTest.php, line 33

Class

ConfigHelperTest
@group lightning_core

Namespace

Drupal\Tests\lightning_core\Kernel

Code

public function testDelete() {
  $this
    ->installConfig('node');
  $this
    ->createContentType([
    'type' => 'page',
  ]);
  $base_field_override = BaseFieldOverride::create([
    'field_name' => 'promote',
    'entity_type' => 'node',
    'bundle' => 'page',
  ]);
  $base_field_override
    ->save();
  ConfigHelper::forModule('node')
    ->delete($base_field_override
    ->getConfigDependencyName());
}