You are here

public function LinkTypeFieldEntryTest::doCreateFlag in Flag 8.4

Create a node type and flag.

1 call to LinkTypeFieldEntryTest::doCreateFlag()
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 83

Class

LinkTypeFieldEntryTest
Test the Field Entry link type.

Namespace

Drupal\Tests\flag\Functional

Code

public function doCreateFlag() {
  $edit = [
    'bundles' => [
      $this->nodeType,
    ],
    'linkTypeConfig' => [
      'flag_confirmation' => $this->flagConfirmMessage,
      'unflag_confirmation' => $this->unflagConfirmMessage,
      'edit_flagging' => $this->flagDetailsMessage,
      'flag_create_button' => $this->createButtonText,
      'flag_delete_button' => $this->deleteButtonText,
      'flag_update_button' => $this->updateButtonText,
    ],
    'link_type' => 'field_entry',
  ];
  $this->flag = $this
    ->createFlagFromArray($edit);
}