function SettingsFormTest::testSettingsForm
Same name in this branch
- 10 core/modules/media_library/tests/src/Functional/SettingsFormTest.php \Drupal\Tests\media_library\Functional\SettingsFormTest::testSettingsForm()
- 10 core/modules/layout_builder/tests/src/Functional/SettingsFormTest.php \Drupal\Tests\layout_builder\Functional\SettingsFormTest::testSettingsForm()
Same name in other branches
- 9 core/modules/media_library/tests/src/Functional/SettingsFormTest.php \Drupal\Tests\media_library\Functional\SettingsFormTest::testSettingsForm()
- 8.9.x core/modules/media_library/tests/src/Functional/SettingsFormTest.php \Drupal\Tests\media_library\Functional\SettingsFormTest::testSettingsForm()
- 11.x core/modules/jsonapi/tests/src/Functional/SettingsFormTest.php \Drupal\Tests\jsonapi\Functional\SettingsFormTest::testSettingsForm()
- 11.x core/modules/media_library/tests/src/Functional/SettingsFormTest.php \Drupal\Tests\media_library\Functional\SettingsFormTest::testSettingsForm()
- 11.x core/modules/layout_builder/tests/src/Functional/SettingsFormTest.php \Drupal\Tests\layout_builder\Functional\SettingsFormTest::testSettingsForm()
Tests the JSON:API settings form.
File
-
core/
modules/ jsonapi/ tests/ src/ Functional/ SettingsFormTest.php, line 28
Class
- SettingsFormTest
- @covers \Drupal\jsonapi\Form\JsonApiSettingsForm @group jsonapi
Namespace
Drupal\Tests\jsonapi\FunctionalCode
public function testSettingsForm() : void {
$account = $this->drupalCreateUser([
'administer site configuration',
]);
$this->drupalLogin($account);
$this->drupalGet('/admin/config/services/jsonapi');
$page = $this->getSession()
->getPage();
$page->selectFieldOption('read_only', 'rw');
$page->pressButton('Save configuration');
$assert_session = $this->assertSession();
$assert_session->pageTextContains('The configuration options have been saved.');
$assert_session->fieldValueEquals('read_only', 'rw');
$page->selectFieldOption('read_only', 'r');
$page->pressButton('Save configuration');
$assert_session->fieldValueEquals('read_only', 'r');
$assert_session->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.