function ContactLanguageTest::testContactLanguage
Tests configuration options with language enabled.
File
- 
              core/
modules/ contact/ tests/ src/ Functional/ ContactLanguageTest.php, line 54  
Class
- ContactLanguageTest
 - Tests contact messages with language module.
 
Namespace
Drupal\Tests\contact\FunctionalCode
public function testContactLanguage() : void {
  // Ensure that contact form by default does not show the language select.
  $this->drupalGet('contact');
  $this->assertSession()
    ->statusCodeEquals(200);
  $this->assertSession()
    ->fieldNotExists('edit-langcode-0-value');
  // Enable translations for feedback contact messages.
  static::enableBundleTranslation('contact_message', 'feedback');
  // Ensure that contact form now shows the language select.
  $this->drupalGet('contact');
  $this->assertSession()
    ->statusCodeEquals(200);
  $this->assertSession()
    ->fieldExists('edit-langcode-0-value');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.