public function AdminUITest::doFlagEnable in Flag 8.4
Enable the flag and ensure it appears on target entities.
1 call to AdminUITest::doFlagEnable()
- AdminUITest::testFlagAdmin in tests/
src/ Functional/ AdminUITest.php - Test basic flag admin.
File
- tests/
src/ Functional/ AdminUITest.php, line 159
Class
- AdminUITest
- Tests the Flag admin UI.
Namespace
Drupal\Tests\flag\FunctionalCode
public function doFlagEnable() {
$this
->drupalGet('admin/structure/flags');
$this
->assertText(t('Disabled'));
$this
->drupalPostForm('admin/structure/flags/manage/' . $this->flagId . '/enable', [], $this
->t('Enable'));
$this
->assertResponse(200);
$this
->drupalGet('admin/structure/flags');
$this
->assertText(t('Enabled'));
$this
->drupalGet('node/' . $this->nodeId);
$this
->assertText($this->flagShortText);
}