You are here

protected function LanguageNegotiationInfoTest::isLanguageTypeConfigurable in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/language/tests/src/Functional/LanguageNegotiationInfoTest.php \Drupal\Tests\language\Functional\LanguageNegotiationInfoTest::isLanguageTypeConfigurable()
  2. 10 core/modules/language/tests/src/Functional/LanguageNegotiationInfoTest.php \Drupal\Tests\language\Functional\LanguageNegotiationInfoTest::isLanguageTypeConfigurable()

Checks whether the given language type is configurable.

Parameters

string $type: The language type.

Return value

bool TRUE if the specified language type is configurable, FALSE otherwise.

1 call to LanguageNegotiationInfoTest::isLanguageTypeConfigurable()
LanguageNegotiationInfoTest::testConfigLangTypeAlterations in core/modules/language/tests/src/Functional/LanguageNegotiationInfoTest.php
Tests altering config of configurable language types.

File

core/modules/language/tests/src/Functional/LanguageNegotiationInfoTest.php, line 217

Class

LanguageNegotiationInfoTest
Tests alterations to language types/negotiation info.

Namespace

Drupal\Tests\language\Functional

Code

protected function isLanguageTypeConfigurable($type) {
  $configurable_types = $this
    ->config('language.types')
    ->get('configurable');
  return in_array($type, $configurable_types);
}