function SystemConfigFormTest::testSystemConfigForm

Tests the SystemConfigFormTestBase class.

File

drupal/core/modules/system/lib/Drupal/system/Tests/Form/SystemConfigFormTest.php, line 36
Contains \Drupal\system\Tests\Form\SystemConfigFormTest.

Class

SystemConfigFormTest
Tests the SystemConfigFormTestBase class.

Namespace

Drupal\system\Tests\Form

Code

function testSystemConfigForm() {
  $this
    ->drupalGet('form-test/system-config-form');
  $element = $this
    ->xpath('//div[@id = :id]/input[contains(@class, :class)]', array(
    ':id' => 'edit-actions',
    ':class' => 'button-primary',
  ));
  $this
    ->assertTrue($element, 'The primary action submit button was found.');
  $this
    ->drupalPost(NULL, array(), t('Save configuration'));
  $this
    ->assertText(t('The configuration options have been saved.'));
}