You are here

protected function SitemapTaxonomyTestBase::createTerms in Sitemap 2.0.x

Same name and namespace in other branches
  1. 8.2 src/Tests/SitemapTaxonomyTestBase.php \Drupal\sitemap\Tests\SitemapTaxonomyTestBase::createTerms()
  2. 8 src/Tests/SitemapTaxonomyTestBase.php \Drupal\sitemap\Tests\SitemapTaxonomyTestBase::createTerms()

Create taxonomy terms.

Parameters

\Drupal\taxonomy\Entity\Vocabulary $vocabulary: Taxonomy vocabulary.

Return value

array List of tags.

Throws

\Exception

6 calls to SitemapTaxonomyTestBase::createTerms()
SitemapTaxonomyTermsRssTest::testIncludeRssLinks in src/Tests/SitemapTaxonomyTermsRssTest.php
Tests included RSS links.
SitemapTaxonomyTermsTest::testNodeCounts in src/Tests/SitemapTaxonomyTermsTest.php
Tests appearance of node counts.
SitemapTaxonomyTermsTest::testTermLinks in src/Tests/SitemapTaxonomyTermsTest.php
Tests the term link settings.
SitemapTaxonomyTermsTest::testTermThreshold in src/Tests/SitemapTaxonomyTermsTest.php
Tests the term_threshold setting.
SitemapTaxonomyTest::testVocabularyDescription in src/Tests/SitemapTaxonomyTest.php
Tests vocabulary description.

... See full list

File

src/Tests/SitemapTaxonomyTestBase.php, line 96

Class

SitemapTaxonomyTestBase
Base class for some Sitemap test cases.

Namespace

Drupal\sitemap\Tests

Code

protected function createTerms(Vocabulary $vocabulary) {
  $term0 = $this
    ->createTerm($vocabulary);
  $term1 = $this
    ->createTerm($vocabulary);
  $term2 = $this
    ->createTerm($vocabulary);
  return [
    $term0,
    $term1,
    $term2,
  ];
}