You are here

public function SystemConfigFormTest::testSystemConfigForm in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/system/tests/src/Functional/Form/SystemConfigFormTest.php \Drupal\Tests\system\Functional\Form\SystemConfigFormTest::testSystemConfigForm()
  2. 9 core/modules/system/tests/src/Functional/Form/SystemConfigFormTest.php \Drupal\Tests\system\Functional\Form\SystemConfigFormTest::testSystemConfigForm()

Tests the SystemConfigFormTestBase class.

File

core/modules/system/tests/src/Functional/Form/SystemConfigFormTest.php, line 29

Class

SystemConfigFormTest
Tests the SystemConfigFormTestBase class.

Namespace

Drupal\Tests\system\Functional\Form

Code

public function testSystemConfigForm() {
  $this
    ->drupalGet('form-test/system-config-form');

  // Verify the primary action submit button is found.
  $this
    ->assertSession()
    ->elementExists('xpath', "//div[@id = 'edit-actions']/input[contains(@class, 'button--primary')]");
  $this
    ->submitForm([], 'Save configuration');
  $this
    ->assertSession()
    ->pageTextContains('The configuration options have been saved.');
}