You are here

function dfpTokensTest::testNetworkIDToken in Doubleclick for Publishers (DFP) 7

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

File

tests/dfp_tokens.test, line 32
Tokens test file for DFP module.

Class

dfpTokensTest
@file Tokens test file for DFP module.

Code

function testNetworkIDToken() {
  $edit = $this
    ->dfpBasicTagEditValues();

  // Create a tag that uses the networkid token in a target.
  $test_network_id = $this
    ->randomName(8);
  variable_set('dfp_network_id', $test_network_id);
  $edit['targeting[0][target]'] = 'network id';
  $edit['targeting[0][value]'] = '[dfp_tag:network_id]';
  $tag = $this
    ->createTag($edit);
  $this
    ->assertPropertySet('Targeting', 'network id', $test_network_id);
}