19be45f3f31a7913767bc3744523ee64eb83a638
[yaffs-website] / web / core / modules / system / src / Tests / Form / SystemConfigFormTest.php
1 <?php
2
3 namespace Drupal\system\Tests\Form;
4
5 use Drupal\simpletest\WebTestBase;
6
7 /**
8  * Tests the SystemConfigFormTestBase class.
9  *
10  * @group Form
11  */
12 class SystemConfigFormTest extends WebTestBase {
13
14   /**
15    * Modules to enable.
16    *
17    * @var array
18    */
19   public static $modules = ['form_test'];
20
21   /**
22    * Tests the SystemConfigFormTestBase class.
23    */
24   public function testSystemConfigForm() {
25     $this->drupalGet('form-test/system-config-form');
26     $element = $this->xpath('//div[@id = :id]/input[contains(@class, :class)]', [':id' => 'edit-actions', ':class' => 'button--primary']);
27     $this->assertTrue($element, 'The primary action submit button was found.');
28     $this->drupalPostForm(NULL, [], t('Save configuration'));
29     $this->assertText(t('The configuration options have been saved.'));
30   }
31
32 }