You are here

protected function LanguageNegotiationInfoTest::stateSet in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/language/src/Tests/LanguageNegotiationInfoTest.php \Drupal\language\Tests\LanguageNegotiationInfoTest::stateSet()

Sets state flags for language_test module.

Ensures to correctly update data both in the child site and the test runner environment.

Parameters

array $values: The key/value pairs to set in state.

1 call to LanguageNegotiationInfoTest::stateSet()
LanguageNegotiationInfoTest::testInfoAlterations in core/modules/language/src/Tests/LanguageNegotiationInfoTest.php
Tests alterations to language types/negotiation info.

File

core/modules/language/src/Tests/LanguageNegotiationInfoTest.php, line 56
Contains \Drupal\language\Tests\LanguageNegotiationInfoTest.

Class

LanguageNegotiationInfoTest
Tests alterations to language types/negotiation info.

Namespace

Drupal\language\Tests

Code

protected function stateSet(array $values) {

  // Set the new state values.
  $this->container
    ->get('state')
    ->setMultiple($values);

  // 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();
}