function GoogleAnalyticsBasicTest::testGoogleAnalyticsConfiguration in Google Analytics 6.4
Same name and namespace in other branches
- 6.3 googleanalytics.test \GoogleAnalyticsBasicTest::testGoogleAnalyticsConfiguration()
- 7.2 googleanalytics.test \GoogleAnalyticsBasicTest::testGoogleAnalyticsConfiguration()
- 7 googleanalytics.test \GoogleAnalyticsBasicTest::testGoogleAnalyticsConfiguration()
File
- ./googleanalytics.test, line 31
- Test file for Google Analytics module.
Class
- GoogleAnalyticsBasicTest
- @file
Test file for Google Analytics module.
Code
function testGoogleAnalyticsConfiguration() {
$this
->drupalGet('admin/reports/status');
$this
->assertRaw('admin/settings/googleanalytics', '[testGoogleAnalyticsConfiguration]: Configure link from Status Reports page to Google Analytics Settings page exists.');
$this
->drupalGet('admin/settings/googleanalytics');
$this
->assertRaw(t('Web Property ID'), '[testGoogleAnalyticsConfiguration]: Settings page displayed.');
$edit['googleanalytics_account'] = $this
->randomName(2);
$this
->drupalPost('admin/settings/googleanalytics', $edit, t('Save configuration'));
$this
->assertRaw(t('A valid Google Analytics Web Property ID is case sensitive and formatted like UA-xxxxxxx-yy.'), '[testGoogleAnalyticsConfiguration]: Invalid Web Property ID number validated.');
}