You are here

public function SmsFrameworkUserMenuLinksTest::testDynamicMenuLinks in SMS Framework 2.x

Same name and namespace in other branches
  1. 8 modules/sms_user/tests/src/Functional/SmsFrameworkUserMenuLinksTest.php \Drupal\Tests\sms_user\Functional\SmsFrameworkUserMenuLinksTest::testDynamicMenuLinks()
  2. 2.1.x modules/sms_user/tests/src/Functional/SmsFrameworkUserMenuLinksTest.php \Drupal\Tests\sms_user\Functional\SmsFrameworkUserMenuLinksTest::testDynamicMenuLinks()

Tests dynamic menu links are found.

File

modules/sms_user/tests/src/Functional/SmsFrameworkUserMenuLinksTest.php, line 43

Class

SmsFrameworkUserMenuLinksTest
Tests dynamically created SMS User menu links.

Namespace

Drupal\Tests\sms_user\Functional

Code

public function testDynamicMenuLinks() {
  $entityDisplayRepo = \Drupal::service('entity_display.repository');
  assert($entityDisplayRepo instanceof EntityDisplayRepositoryInterface);
  $entityDisplayRepo
    ->getFormDisplay('user', 'user', 'default')
    ->save();
  $this
    ->createPhoneNumberSettings('user', 'user');
  $this
    ->drupalGet(Url::fromRoute('user.admin_index'));
  $this
    ->assertLink('User phone number');
}