public function GoogleAnalyticsCustomUrls::testGoogleAnalyticsUserPasswordPage in Google Analytics 7.2
Tests if user password page urls are overridden.
File
- ./
googleanalytics.test, line 507 - Test file for Google Analytics module.
Class
- GoogleAnalyticsCustomUrls
- Test custom url functionality of Google Analytics module.
Code
public function testGoogleAnalyticsUserPasswordPage() {
$base_path = base_path();
$ua_code = 'UA-123456-4';
variable_set('googleanalytics_account', $ua_code);
$this
->drupalGet('user/password', array(
'query' => array(
'name' => 'foo',
),
));
$this
->assertRaw('ga("set", "page", "' . $base_path . 'user/password"');
$this
->drupalGet('user/password', array(
'query' => array(
'name' => 'foo@example.com',
),
));
$this
->assertRaw('ga("set", "page", "' . $base_path . 'user/password"');
$this
->drupalGet('user/password');
$this
->assertNoRaw('ga("set", "page",', '[testGoogleAnalyticsCustomUrls]: Custom url not set.');
}