function PardotFunctionalityTestCase::_testScoringJS in Pardot Integration 6
1 call to PardotFunctionalityTestCase::_testScoringJS()
- PardotFunctionalityTestCase::testSettingsAndJSAddition in ./
pardot.test - Verify that settings work and that basic JS Addition is functional.
File
- ./
pardot.test, line 93
Class
- PardotFunctionalityTestCase
- Basic Pardot Test Case implementation.
Code
function _testScoringJS() {
// Add a campaign.
$this
->drupalPost('admin/settings/pardot/scoring', array(
'path' => 'user/register',
'score' => '50',
), t('Add'));
$this
->drupalGet('node');
$this
->assertNoRaw('piPoints = "', 'No Pardot scoring on general page.');
$this
->drupalGet('user/register');
$this
->assertRaw('piPoints = "50"', 'Pardot scoring found on scored page.');
// Modify a campaign.
$this
->drupalPost("admin/settings/pardot/scoring/1/edit", array(
'path' => 'user/register',
'score' => '60',
), t('Save'));
$this
->drupalGet('node');
$this
->assertNoRaw('piPoints = "', 'No Pardot scoring on general page after modification.');
$this
->drupalGet('user/register');
$this
->assertRaw('piPoints = "60"', 'Pardot scoring found on scored page after modification.');
// Delete a campaign.
$this
->drupalPost("admin/settings/pardot/scoring/1/delete", array(), t('Delete'));
$this
->drupalGet('user/register');
$this
->assertNoRaw('piPoints = "', 'Pardot scoring not found on scored page after deletion.');
}