You are here

public function TaxonomyManagerConfigTest::testTaxonomyManagerConfiguration in Taxonomy Manager 8

Same name and namespace in other branches
  1. 2.0.x src/Tests/TaxonomyManagerConfigTest.php \Drupal\taxonomy_manager\Tests\TaxonomyManagerConfigTest::testTaxonomyManagerConfiguration()

Tests configuration options of the taxonomy_manager module.

File

src/Tests/TaxonomyManagerConfigTest.php, line 24

Class

TaxonomyManagerConfigTest
Tests the configuration form.

Namespace

Drupal\taxonomy_manager\Tests

Code

public function testTaxonomyManagerConfiguration() {

  // Create a user with permission to administer taxonomy.
  $user = $this
    ->drupalCreateUser([
    'administer taxonomy',
  ]);
  $this
    ->drupalLogin($user);

  // Make a POST request to
  // admin/config/user-interface/taxonomy-manager-settings.
  $edit = [];
  $edit['taxonomy_manager_disable_mouseover'] = '1';
  $edit['taxonomy_manager_pager_tree_page_size'] = '50';
  $this
    ->drupalPostForm('admin/config/user-interface/taxonomy-manager-settings', $edit, $this
    ->t('Save configuration'));
  $this
    ->assertResponse(200);
  $this
    ->assertText($this
    ->t('The configuration options have been saved.'), "Saving configuration options successfully.");
}