You are here

public function AdminUITest::doFlagDisable in Flag 8.4

Disable the flag and ensure the link does not appear on entities.

1 call to AdminUITest::doFlagDisable()
AdminUITest::testFlagAdmin in tests/src/Functional/AdminUITest.php
Test basic flag admin.

File

tests/src/Functional/AdminUITest.php, line 142

Class

AdminUITest
Tests the Flag admin UI.

Namespace

Drupal\Tests\flag\Functional

Code

public function doFlagDisable() {
  $this
    ->drupalGet('admin/structure/flags');
  $this
    ->assertText(t('Enabled'));
  $this
    ->drupalPostForm('admin/structure/flags/manage/' . $this->flagId . '/disable', [], $this
    ->t('Disable'));
  $this
    ->assertResponse(200);
  $this
    ->drupalGet('admin/structure/flags');
  $this
    ->assertText(t('Disabled'));
  $this
    ->drupalGet('node/' . $this->nodeId);
  $this
    ->assertNoText($this->flagShortText);
}