Upgraded drupal core with security updates
[yaffs-website] / web / core / modules / taxonomy / tests / src / Functional / TermCacheTagsTest.php
1 <?php
2
3 namespace Drupal\Tests\taxonomy\Functional;
4
5 use Drupal\system\Tests\Entity\EntityWithUriCacheTagsTestBase;
6 use Drupal\taxonomy\Entity\Vocabulary;
7 use Drupal\taxonomy\Entity\Term;
8
9 /**
10  * Tests the Taxonomy term entity's cache tags.
11  *
12  * @group taxonomy
13  */
14 class TermCacheTagsTest extends EntityWithUriCacheTagsTestBase {
15
16   /**
17    * {@inheritdoc}
18    */
19   public static $modules = ['taxonomy'];
20
21   /**
22    * {@inheritdoc}
23    */
24   protected function createEntity() {
25     // Create a "Camelids" vocabulary.
26     $vocabulary = Vocabulary::create([
27       'name' => 'Camelids',
28       'vid' => 'camelids',
29     ]);
30     $vocabulary->save();
31
32     // Create a "Llama" taxonomy term.
33     $term = Term::create([
34       'name' => 'Llama',
35       'vid' => $vocabulary->id(),
36     ]);
37     $term->save();
38
39     return $term;
40   }
41
42 }