public function PermissionsTest::testUser1 in Metatag 8
Confirm that the node form isn't affected for user 1.
User 1 will be logged in from the setUp() method.
File
- metatag_extended_perms/
tests/ src/ Functional/ PermissionsTest.php, line 128
Class
- PermissionsTest
- Verify the new permissions are added.
Namespace
Drupal\Tests\metatag_extended_perms\FunctionalCode
public function testUser1() {
// Load the node form.
$this
->drupalGet('node/add/page');
// Confirm that the site didn't throw a server error or something else.
$session = $this
->assertSession();
$session
->statusCodeEquals(200);
// Look for each of the meta tags.
foreach ($this->permissions as $group => $perms) {
foreach ($perms as $tag_name => $tag_label) {
// Look for the checkbox.
$session
->fieldExists("field_metatag[0][{$group}][{$tag_name}]");
}
}
}