protected function runTest($test) {
if (!empty($test['language_negotiation'])) {
$method_weights = array_flip($test['language_negotiation']);
language_negotiation_set(LANGUAGE_TYPE_INTERFACE, $method_weights);
}
if (!empty($test['language_negotiation_url_part'])) {
config('language.negotiation')
->set('url.source', $test['language_negotiation_url_part'])
->save();
}
if (!empty($test['language_test_domain'])) {
state()
->set('language_test.domain', $test['language_test_domain']);
}
$this
->drupalGet($test['path'], array(), $test['http_header']);
$this
->assertText($test['expect'], $test['message']);
$this
->assertText(t('Language negotiation method: @name', array(
'@name' => $test['expected_method_id'],
)));
}