You are here

protected function DfpTestBase::dfpEditTag in Doubleclick for Publishers (DFP) 8

Edits a given tag specified by $id with the given values.

Parameters

string $id: The DFP tag ID.

array $edit: An array of values for the DFP tag form.

Return value

\Drupal\dfp\Entity\Tag The edited DFP tag.

3 calls to DfpTestBase::dfpEditTag()
DisplayTagTest::testDisplayTagWithMapping in tests/src/Functional/DisplayTagTest.php
Tests breakpoint mappings.
DisplayTagTest::testSlug in tests/src/Functional/DisplayTagTest.php
Tests slug display.
DisplayTagTest::testTargeting in tests/src/Functional/DisplayTagTest.php
Tests targeting display.

File

tests/src/Functional/DfpTestBase.php, line 90
Contains \Drupal\Tests\dfp\Functional\DfpTestBase.

Class

DfpTestBase
An abstract class to build DFP tests from.

Namespace

Drupal\Tests\dfp\Functional

Code

protected function dfpEditTag($id, &$edit) {

  // Make sure there is no machinename set when we are editing.
  if (isset($edit['id'])) {
    unset($edit['id']);
  }
  $this
    ->drupalPostForm('admin/structure/dfp/tags/manage/' . $id, $edit, t('Save'));
  return Tag::load($id);
}