stateSet example

// Refresh in-memory static state/config caches and static variables.     $this->refreshVariables();
    // Refresh/rewrite language negotiation configuration, in order to pick up     // the manipulations performed by language_test module's info alter hooks.     $this->container->get('language_negotiator')->purgeConfiguration();
  }

  /** * Tests alterations to language types/negotiation info. */
  public function testInfoAlterations() {
    $this->stateSet([
      // Enable language_test type info.       'language_test.language_types' => TRUE,
      // Enable language_test negotiation info (not altered yet).       'language_test.language_negotiation_info' => TRUE,
      // Alter LanguageInterface::TYPE_CONTENT to be configurable.       'language_test.content_language_type' => TRUE,
    ]);
    $this->container->get('module_installer')->install(['language_test']);
    $this->resetAll();

    // Check that fixed language types are properly configured without the need
Home | Imprint | This part of the site doesn't use cookies.