public function TaxonomyMenuOperationsTest::testTaxTermCreate in Taxonomy menu 8.3
Test creation of taxonomy term.
File
- tests/
src/ Functional/ TaxonomyMenuOperationsTest.php, line 135
Class
- TaxonomyMenuOperationsTest
- Tests the operations of Taxonomy Menu.
Namespace
Drupal\Tests\taxonomy_menu\FunctionalCode
public function testTaxTermCreate() {
// Create a new term.
$this
->drupalGet('admin/structure/taxonomy/manage/test_tax_vocab/add');
$edit = [
'name[0][value]' => 'test term 3',
];
$this
->drupalPostForm(NULL, $edit, t('Save'));
$this
->drupalGet('admin/structure/menu/manage/test-menu');
// Check for it within the menu.
// We should expect to see enabled field for taxonomy term 4
$this
->assertSession()
->fieldExists('links[menu_plugin_id:taxonomy_menu.menu_link:taxonomy_menu.menu_link.test_tax_menu.3][enabled]');
}