You are here

protected function ConfigHandlerTest::setUp in Update helper 8

Same name and namespace in other branches
  1. 2.x tests/src/Kernel/ConfigHandlerTest.php \Drupal\Tests\update_helper\Kernel\ConfigHandlerTest::setUp()

Overrides KernelTestBase::setUp

File

tests/src/Kernel/ConfigHandlerTest.php, line 77

Class

ConfigHandlerTest
Automated tests for ConfigName class.

Namespace

Drupal\Tests\update_helper\Kernel

Code

protected function setUp() {
  parent::setUp();
  $this->configFileBackup = tempnam(sys_get_temp_dir(), 'update_helper_test_');

  /** @var \Drupal\Core\Config\FileStorage $extensionStorage */
  $extensionStorage = \Drupal::service('config_update.extension_storage');
  $configFilePath = $extensionStorage
    ->getFilePath('field.storage.node.body');
  $this
    ->assertEqual(TRUE, copy($configFilePath, $this->configFileBackup));
}