public function EasyBreabcrumbConfigureTest::testAdministration in Easy Breadcrumb 8
Same name and namespace in other branches
- 2.x tests/src/Functional/EasyBreabcrumbConfigureTest.php \Drupal\Tests\easy_email\Functional\EasyBreabcrumbConfigureTest::testAdministration()
Tests configuring easy_breadcrumb.
File
- tests/
src/ Functional/ EasyBreabcrumbConfigureTest.php, line 29
Class
- EasyBreabcrumbConfigureTest
- Tests configuring easy_breadcrumb.
Namespace
Drupal\Tests\easy_email\FunctionalCode
public function testAdministration() {
$assert = $this
->assertSession();
$config_after_install = $this
->config('easy_breadcrumb.settings')
->get();
$this
->drupalGet('admin/config/user-interface/easy-breadcrumb');
$assert
->statusCodeEquals(403);
$this
->drupalLogin($this
->createUser([
'administer easy breadcrumb',
]));
$this
->drupalGet('admin/config/user-interface/easy-breadcrumb');
$assert
->statusCodeEquals(200);
$this
->submitForm([], 'Save configuration');
$assert
->statusCodeEquals(200);
$assert
->pageTextContainsOnce('The configuration options have been saved.');
$this
->assertSame($config_after_install, $this
->config('easy_breadcrumb.settings')
->get());
}