8461dbc552f5aed652616cef795c9cf1a7baad1e
[yaffs-website] / web / modules / contrib / metatag / src / Tests / MetatagFieldNodeTest.php
1 <?php
2
3 namespace Drupal\metatag\Tests;
4
5 use Drupal\Core\Cache\Cache;
6 use Drupal\metatag\Tests\MetatagFieldTestBase;
7
8 /**
9  * Ensures that the Metatag field works correctly on nodes.
10  *
11  * @group metatag
12  */
13 class MetatagFieldNodeTest extends MetatagFieldTestBase {
14
15   /**
16    * {@inheritDoc}
17    */
18   public static $modules = [
19     // Needed for token handling.
20     'token',
21
22     // Needed for the field UI testing.
23     'field_ui',
24
25     // Needed to verify that nothing is broken for unsupported entities.
26     'contact',
27
28     // The base module.
29     'metatag',
30
31     // Some extra custom logic for testing Metatag.
32     'metatag_test_tag',
33
34     // Manages the entity type that is being tested.
35     'node',
36   ];
37
38   /**
39    * {@inheritDoc}
40    */
41   protected $entity_perms = [
42     // From Field UI.
43     'administer node fields',
44
45     // From Node.
46     'access content',
47     'administer content types',
48     'administer nodes',
49     'bypass node access',
50     'create page content',
51     'edit any page content',
52     'edit own page content',
53   ];
54
55   /**
56    * {@inheritDoc}
57    */
58   protected $entity_type = 'node';
59
60   /**
61    * {@inheritDoc}
62    */
63   protected $entity_label = 'Content';
64
65   /**
66    * {@inheritDoc}
67    */
68   protected $entity_bundle = 'page';
69
70   /**
71    * {@inheritDoc}
72    */
73   protected $entity_add_path = 'node/add';
74
75   /**
76    * {@inheritDoc}
77    */
78   protected $entity_field_admin_path = 'admin/structure/types/manage/page/fields';
79
80   /**
81    * {@inheritDoc}
82    */
83   protected $entity_save_button_label = 'Save and publish';
84
85   /**
86    * {@inheritDoc}
87    */
88   protected function setUpEntityType() {
89     $this->createContentType(['type' => 'page']);
90   }
91
92 }