function PiwikBasicTest::testPiwik in Piwik Web Analytics 6
Same name and namespace in other branches
- 7 piwik.test \PiwikBasicTest::testPiwik()
File
- tests/
piwik_basic.test, line 27 - Test file for Piwik module.
Class
- PiwikBasicTest
- @file Test file for Piwik module.
Code
function testPiwik() {
// Check for setting page's presence.
$this
->drupalGet('admin/settings/piwik');
$this
->assertRaw(t('Piwik site ID'), "[testPiwik]: Settings page displayed.");
// Check for account code validation.
$edit['piwik_site_id'] = $this
->randomName(2);
$this
->drupalPost('admin/settings/piwik', $edit, 'Save configuration');
$this
->assertRaw(t('A valid Piwik site ID is an integer only.'), "[testPiwik]: Account number validated.");
}