3 namespace Drupal\metatag\Tests;
5 use Drupal\Core\Cache\Cache;
6 use Drupal\metatag\Tests\MetatagFieldTestBase;
9 * Ensures that the Metatag field works correctly on nodes.
13 class MetatagFieldNodeTest extends MetatagFieldTestBase {
18 public static $modules = [
19 // Needed for token handling.
22 // Needed for the field UI testing.
25 // Needed to verify that nothing is broken for unsupported entities.
31 // Some extra custom logic for testing Metatag.
34 // Manages the entity type that is being tested.
41 protected $entity_perms = [
43 'administer node fields',
47 'administer content types',
50 'create page content',
51 'edit any page content',
52 'edit own page content',
58 protected $entity_type = 'node';
63 protected $entity_label = 'Content';
68 protected $entity_bundle = 'page';
73 protected $entity_add_path = 'node/add';
78 protected $entity_field_admin_path = 'admin/structure/types/manage/page/fields';
83 protected $entity_save_button_label = 'Save and publish';
88 protected function setUpEntityType() {
89 $this->createContentType(['type' => 'page']);