You are here

public function XmlSitemapUserFunctionalTest::testUserForm in XML sitemap 2.x

Same name and namespace in other branches
  1. 8 tests/src/Functional/XmlSitemapUserFunctionalTest.php \Drupal\Tests\xmlsitemap\Functional\XmlSitemapUserFunctionalTest::testUserForm()

Test sitemap fields on user forms.

File

tests/src/Functional/XmlSitemapUserFunctionalTest.php, line 67

Class

XmlSitemapUserFunctionalTest
Tests the generation of user links.

Namespace

Drupal\Tests\xmlsitemap\Functional

Code

public function testUserForm() {
  $this
    ->drupalLogin($this->admin_user);
  $this
    ->drupalGet('admin/people/create');
  $this
    ->assertSession()
    ->fieldExists('xmlsitemap[status]');
  $this
    ->assertSession()
    ->fieldExists('xmlsitemap[priority]');
  $this
    ->assertSession()
    ->fieldExists('xmlsitemap[changefreq]');
  $this
    ->drupalGet('user/' . $this->normal_user
    ->id() . '/edit');
  $this
    ->assertSession()
    ->fieldExists('xmlsitemap[status]');
  $this
    ->assertSession()
    ->fieldExists('xmlsitemap[priority]');
  $this
    ->assertSession()
    ->fieldExists('xmlsitemap[changefreq]');
}