3 namespace Drupal\metatag\Tests;
6 * Ensures that the Metatag field works correctly on users.
10 class MetatagFieldUserTest 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 user fields',
43 'administer account settings',
50 protected $entityType = 'user';
55 protected $entityLabel = 'User';
60 protected $entityBundle = 'user';
65 protected $entityAddPath = 'admin/people/create';
70 protected $entityFieldAdminPath = 'admin/config/people/accounts/fields';
75 protected $entityTitleField = 'name';
80 protected $entitySaveButtonLabel = 'Create new account';
85 protected function entityDefaultValues($title = 'Barfoo') {
86 $password = $this->randomString(16);
88 'mail' => 'test' . $this->adminUser->getEmail(),
90 'pass[pass1]' => $password,
91 'pass[pass2]' => $password,
96 * Confirm the metatag field can be shown on a user registration page.
100 public function testFieldsOnUserRegistrationForm() {}
103 * Confirm the metatag field can be shown on a normal user's own edit form.
107 public function testFieldsOnUserEditForm() {}