You are here

function dfpBaseTest::dfpBasicTagEditValues in Doubleclick for Publishers (DFP) 7

Same name and namespace in other branches
  1. 7.2 tests/dfp.test \dfpBaseTest::dfpBasicTagEditValues()

Create a simple $edit array to be used on the DFP tag form to create a new DFP tag object.

8 calls to dfpBaseTest::dfpBasicTagEditValues()
dfpAdCategoriesTest::testDisplayAdCategories in tests/dfp_ad_categories.test
dfpBaseTest::createTag in tests/dfp_base.test
Creates a basic dfp ad tag.
dfpDisplayTagTest::testBackfill in tests/dfp_display_tag.test
dfpDisplayTagTest::testDisplayTagWithMapping in tests/dfp_display_tag.test
dfpDisplayTagTest::testSlug in tests/dfp_display_tag.test

... See full list

File

tests/dfp_base.test, line 30
Base test file for DFP module.

Class

dfpBaseTest
@file Base test file for DFP module.

Code

function dfpBasicTagEditValues() {
  $machinename = drupal_strtolower($this
    ->randomName(8));
  $basic_tag = array(
    'machinename' => $machinename,
    'slot' => $machinename,
    'size' => implode(',', $this
      ->dfpGenerateSize(2)),
    'adunit' => $this
      ->randomName(8),
    'block' => 1,
    'settings[slug]' => $this
      ->randomName(32),
    'settings[adsense_ad_types]' => '',
    'settings[adsense_channel_ids]' => '',
    'settings[adsense_colors][background]' => '',
    'settings[adsense_colors][border]' => '',
    'settings[adsense_colors][link]' => '',
    'settings[adsense_colors][text]' => '',
    'settings[adsense_colors][url]' => '',
    'targeting[0][target]' => $this
      ->randomName(8),
    'targeting[0][value]' => $this
      ->randomName(8),
    'breakpoints[0][browser_size]' => $this
      ->dfpGenerateSize(),
    'breakpoints[0][ad_sizes]' => implode(',', $this
      ->dfpGenerateSize(2)),
  );
  return $basic_tag;
}