You are here

function PiwikBasicTest::testPiwik in Piwik Web Analytics 7

Same name and namespace in other branches
  1. 6 tests/piwik_basic.test \PiwikBasicTest::testPiwik()

File

./piwik.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/config/system/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/config/system/piwik', $edit, 'Save configuration');
  $this
    ->assertRaw(t('A valid Piwik site ID is an integer only.'), "[testPiwik]: Account number validated.");
}