3 namespace Drupal\metatag\Tests;
6 * Ensures that the Metatag field works correctly on nodes.
10 class MetatagFieldNodeTest extends MetatagFieldTestBase {
15 public static $modules = [
16 // Needed for token handling.
19 // Needed for the field UI testing.
22 // Needed to verify that nothing is broken for unsupported entities.
28 // Some extra custom logic for testing Metatag.
31 // Manages the entity type that is being tested.
38 protected $entityPerms = [
40 'administer node fields',
44 'administer content types',
47 'create page content',
48 'edit any page content',
49 'edit own page content',
55 protected $entityType = 'node';
60 protected $entityLabel = 'Content';
65 protected $entityBundle = 'page';
70 protected $entityAddPath = 'node/add';
75 protected $entityFieldAdminPath = 'admin/structure/types/manage/page/fields';
80 protected function setUpEntityType() {
81 $this->createContentType(['type' => 'page']);
83 // 8.3 has the label 'Save and publish'.
84 if ((floatval(\Drupal::VERSION) <= 8.3)) {
85 $this->entitySaveButtonLabel = 'Save and publish';