a568c87c4861652b028352f872442d70f9ce8c97
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d8 / test / web.twig
1 <?php
2
3 namespace Drupal\{{ machine_name }}\Tests;
4
5 use Drupal\simpletest\WebTestBase;
6
7 /**
8  * Tests site configuration.
9  *
10  * @group {{ machine_name }}
11  */
12 class {{ class }} extends WebTestBase {
13
14   /**
15    * Modules to enable.
16    *
17    * @var array
18    */
19   public static $modules = [
20     'node',
21     'field',
22     'contact',
23     'views',
24     'taxonomy',
25   ];
26
27   /**
28    * {@inheritdoc}
29    */
30   protected function setUp() {
31     parent::setUp();
32     $user = $this->drupalCreateUser(['administer site configuration']);
33     $this->drupalLogin($user);
34   }
35
36   /**
37    * Test site information form.
38    */
39   public function testFieldStorageSettingsForm() {
40     $edit = [
41       'site_name' => 'Drupal',
42       'site_slogan' => 'Community plumbing',
43       'site_mail' => 'admin@example.local',
44       'site_frontpage' => '/user',
45     ];
46     $this->drupalPostForm('admin/config/system/site-information', $edit, t('Save configuration'));
47     $this->assertText(t('The configuration options have been saved.'), 'Configuration options have been saved');
48   }
49
50 }