Commit b045dd70 authored by hass's avatar hass
Browse files

#1797988: Added one more DNT test.

parent ca95c629
......@@ -101,6 +101,10 @@ class GoogleAnalyticsBasicTest extends DrupalWebTestCase {
// Test whether DNT header is able to remove the tracking code.
$this->drupalGet('', array(), array('DNT: 1'));
$this->assertNoRaw('_gaq.push(["_trackPageview"]);', '[testGoogleAnalyticsDNTVisibility]: DNT header received from client. Tracking has been disabled by browser.');
// Disable DNT feature and see if tracker is still embedded.
variable_set('googleanalytics_privacy_donottrack', 0);
$this->drupalGet('', array(), array('DNT: 1'));
$this->assertRaw('_gaq.push(["_trackPageview"]);', '[testGoogleAnalyticsDNTVisibility]: DNT feature is disabled, DNT header from browser has been ignored.');
}
function testGoogleAnalyticsTrackingCode() {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment