You are here

protected function SiteMapCategoriesTest::createNode in Site map 8

Create node and assign tags to it.

Parameters

array $tags: Tags to assign to node.

1 call to SiteMapCategoriesTest::createNode()
SiteMapCategoriesTest::testCategoryCountThreshold in src/Tests/SiteMapCategoriesTest.php
Tests category count threshold.

File

src/Tests/SiteMapCategoriesTest.php, line 264

Class

SiteMapCategoriesTest
Test case class for site map categories tests.

Namespace

Drupal\site_map\Tests

Code

protected function createNode($tags = array()) {
  $title = $this
    ->randomString();
  $edit = array(
    'title[0][value]' => $title,
    'menu[title]' => $title,
    $this->field_tags_name => implode(',', $tags),
  );
  $this
    ->drupalPostForm('node/add/article', $edit, t('Save and publish'));
}