public function SiteSettingsUiTest::testSiteSettingsAddAnother in Site Settings and Labels 8
Test site settings add another.
File
- src/
Tests/ SiteSettingsUiTest.php, line 91
Class
- SiteSettingsUiTest
- Tests the loading of Site Settings.
Namespace
Drupal\site_settings\TestsCode
public function testSiteSettingsAddAnother() {
// Open the site settings list page.
$this
->drupalGet('admin/content/site-settings');
// Click add another link.
$this
->clickLink('Add another', 2);
// Make sure we can see the expected form.
$this
->assertText('Test multiple entries');
$this
->assertText('Testing');
$params = [
'field_testing[0][value]' => 'testSiteSettingsAddAnother',
];
$this
->drupalPostForm(NULL, $params, $this
->t('Save'));
// Ensure we saved correctly.
$this
->assertText('Created the Test multiple entries Site Setting.');
$this
->assertText('testSiteSettingsAddAnother');
}