You are here

function AdvancedForumControllerTest::testAdminForm in Advanced Forum 8

Testing Advanced Forum admin pages.

Throws

\Exception Exceptions if tests failed.

File

src/Tests/AdvancedForumControllerTest.php, line 48
Contains \Drupal\advanced_forum\Tests\AdvancedForumControllerTest.

Class

AdvancedForumControllerTest
Class AdvancedForumControllerTest.

Namespace

Drupal\advanced_forum\Tests

Code

function testAdminForm() {

  // Check menu item.
  $this
    ->drupalGet('/admin/config/content');
  $this
    ->assertText('Advanced Forum', 'Advanced Forum menu item is present');

  // Check configuration form.
  $this
    ->drupalGet('/admin/config/content/advanced-forum');
  $this
    ->assertText('Advanced forum style', 'Advanced forum style option is present');
  $this
    ->drupalPostForm('/admin/config/content/advanced-forum', [], t('Save configuration'));
}