public function SettingsFormTest::testSettingsForm in Drupal 9
Same name and namespace in other branches
- 8 core/modules/media_library/tests/src/Functional/SettingsFormTest.php \Drupal\Tests\media_library\Functional\SettingsFormTest::testSettingsForm()
- 10 core/modules/media_library/tests/src/Functional/SettingsFormTest.php \Drupal\Tests\media_library\Functional\SettingsFormTest::testSettingsForm()
Tests the Media Library settings form.
File
- core/
modules/ media_library/ tests/ src/ Functional/ SettingsFormTest.php, line 28
Class
- SettingsFormTest
- Tests the Media Library settings form.
Namespace
Drupal\Tests\media_library\FunctionalCode
public function testSettingsForm() {
$account = $this
->drupalCreateUser([
'access administration pages',
'administer media',
]);
$this
->drupalLogin($account);
$page = $this
->getSession()
->getPage();
$assert_session = $this
->assertSession();
$this
->drupalGet('/admin/config');
$page
->clickLink('Media Library settings');
$page
->checkField('Enable advanced UI');
$page
->pressButton('Save configuration');
$assert_session
->checkboxChecked('Enable advanced UI');
$page
->uncheckField('Enable advanced UI');
$page
->pressButton('Save configuration');
$assert_session
->checkboxNotChecked('Enable advanced UI');
}