You are here

public function OutputLocationEntityFormAccessTest::testCheckboxAccess in Flag 8.4

Tests the access to the flag checkbox in the node edit form.

File

tests/src/Functional/OutputLocationEntityFormAccessTest.php, line 109

Class

OutputLocationEntityFormAccessTest
Tests the entity form checkbox output respects flag access control.

Namespace

Drupal\Tests\flag\Functional

Code

public function testCheckboxAccess() {

  // Get the node edit form.
  $this
    ->drupalGet("node/" . $this->node
    ->id() . "/edit");
  $this
    ->assertSession()
    ->pageTextContains('Flag allowed', 'The checkbox for the flag with access is shown.');
  $this
    ->assertSession()
    ->pageTextNotContains('Flag denied', 'The checkbox for the flag without access is not shown.');
}