You are here

public function ContextBlockTest::testTaxonomyTerm in Core Context 8

Tests viewing context values stored on a taxonomy term.

File

tests/src/Functional/ContextBlockTest.php, line 181

Class

ContextBlockTest
@group core_context

Namespace

Drupal\Tests\core_context\Functional

Code

public function testTaxonomyTerm() {
  Vocabulary::create([
    'vid' => 'tags',
    'name' => 'Tags',
  ])
    ->save();
  $term = Term::create([
    'vid' => 'tags',
    'name' => $this
      ->randomString(),
  ]);
  $term
    ->save();
  $this
    ->doEntityTest($term);
}