You are here

public function UserFlagTypeTest::testFlagSelfCheckbox in Flag 8.4

Tests that when adding a flag for users the relevant checkboxes are added.

File

tests/src/Functional/UserFlagTypeTest.php, line 22

Class

UserFlagTypeTest
Tests user flag type integrations.

Namespace

Drupal\Tests\flag\Functional

Code

public function testFlagSelfCheckbox() {

  // Login as the admin user.
  $this
    ->drupalLogin($this->adminUser);
  $this
    ->drupalPostForm('admin/structure/flags/add', [
    'flag_entity_type' => 'entity:user',
  ], $this
    ->t('Continue'));
  $this
    ->assertText($this
    ->t('Permissions for users to flag themselves.'));
  $this
    ->assertText($this
    ->t('Display link on user profile page'));
}