public function LinkTypeFieldEntryTest::doUnflagNode in Flag 8.4
Test unflagging content.
1 call to LinkTypeFieldEntryTest::doUnflagNode()
- LinkTypeFieldEntryTest::testCreateFieldEntryFlag in tests/
src/ Functional/ LinkTypeFieldEntryTest.php - Create a new flag with the Field Entry type, and add fields.
File
- tests/
src/ Functional/ LinkTypeFieldEntryTest.php, line 206
Class
- LinkTypeFieldEntryTest
- Test the Field Entry link type.
Namespace
Drupal\Tests\flag\FunctionalCode
public function doUnflagNode() {
// Navigate to the node page.
$this
->drupalGet('node/' . $this->nodeId);
// Click the Unflag link.
$this
->clickLink($this->flag
->getShortText('unflag'));
// Click the delete link.
$this
->clickLink($this->deleteButtonText);
// Check if we have the confirm form message displayed.
$this
->assertText($this->unflagConfirmMessage);
// Submit the confirm form.
$this
->drupalPostForm(NULL, [], $this->deleteButtonText);
$this
->assertResponse(200);
// Check that the node is no longer flagged.
$this
->drupalGet('node/' . $this->nodeId);
$this
->assertLink($this->flag
->getShortText('flag'));
}