class SystemConfigFormTest
Same name and namespace in other branches
- 11.x core/modules/system/tests/src/Functional/Form/SystemConfigFormTest.php \Drupal\Tests\system\Functional\Form\SystemConfigFormTest
- 10 core/modules/system/tests/src/Functional/Form/SystemConfigFormTest.php \Drupal\Tests\system\Functional\Form\SystemConfigFormTest
- 8.9.x core/modules/system/tests/src/Functional/Form/SystemConfigFormTest.php \Drupal\Tests\system\Functional\Form\SystemConfigFormTest
Tests the SystemConfigFormTestBase class.
@group Form
Hierarchy
- class \Drupal\Tests\BrowserTestBase uses \Drupal\Core\Test\FunctionalTestSetupTrait, \Drupal\Tests\UiHelperTrait, \Drupal\Core\Test\TestSetupTrait, \Drupal\Tests\block\Traits\BlockCreationTrait, \Drupal\FunctionalTests\AssertLegacyTrait, \Drupal\Tests\RandomGeneratorTrait, \Drupal\Tests\node\Traits\NodeCreationTrait, \Drupal\Tests\node\Traits\ContentTypeCreationTrait, \Drupal\Tests\ConfigTestTrait, \Drupal\Tests\TestRequirementsTrait, \Drupal\Tests\user\Traits\UserCreationTrait, \Drupal\Tests\XdebugRequestTrait, \Drupal\Tests\Traits\PhpUnitWarnings, \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait, \Drupal\Tests\ExtensionListTestTrait implements \PHPUnit\Framework\TestCase
- class \Drupal\Tests\system\Functional\Form\SystemConfigFormTest implements \Drupal\Tests\BrowserTestBase
Expanded class hierarchy of SystemConfigFormTest
File
-
core/
modules/ system/ tests/ src/ Functional/ Form/ SystemConfigFormTest.php, line 12
Namespace
Drupal\Tests\system\Functional\FormView source
class SystemConfigFormTest extends BrowserTestBase {
/**
* Modules to enable.
*
* @var array
*/
protected static $modules = [
'form_test',
];
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* Tests the SystemConfigFormTestBase class.
*/
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.');
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.