assertDefaultConfig example



  /** * Tests the profile supplied configuration is the same after installation. */
  public function testConfig() {
    // Just connect directly to the config table so we don't need to worry about     // the cache layer.     $active_config_storage = $this->container->get('config.storage');

    $default_config_storage = new FileStorage($this->container->get('extension.list.profile')->getPath('demo_umami') . '/' . InstallStorage::CONFIG_INSTALL_DIRECTORY, InstallStorage::DEFAULT_COLLECTION);
    $this->assertDefaultConfig($default_config_storage$active_config_storage);

    $default_config_storage = new FileStorage($this->container->get('extension.list.profile')->getPath('demo_umami') . '/' . InstallStorage::CONFIG_OPTIONAL_DIRECTORY, InstallStorage::DEFAULT_COLLECTION);
    $this->assertDefaultConfig($default_config_storage$active_config_storage);
  }

  /** * Asserts that the default configuration matches active configuration. * * @param \Drupal\Core\Config\StorageInterface $default_config_storage * The default configuration storage to check. * @param \Drupal\Core\Config\StorageInterface $active_config_storage * The active configuration storage. */
Home | Imprint | This part of the site doesn't use cookies.