You are here

function StatisticsProBaseTestCase::completeTestAggregatedData in Statistics Pro 6.2

Same name and namespace in other branches
  1. 6 tests/statspro.test \StatisticsProBaseTestCase::completeTestAggregatedData()
2 calls to StatisticsProBaseTestCase::completeTestAggregatedData()
StatsproTestCase::testInitialState in tests/statspro.test
StatsproTestCase::testPosNavegationState in tests/statspro.test

File

tests/statspro.test, line 255
Functionality tests for Statistics Pro.

Class

StatisticsProBaseTestCase
Base class for Statistics Pro tests.

Code

function completeTestAggregatedData($type, $correct, $group) {
  $result = $this->statspro
    ->get_aggregate_stat($type);
  $this
    ->verbose(t("statspro->get_aggregate_stat('@type') result: '@result'", array(
    '@result' => var_export($result, TRUE),
    '@type' => $type,
  )));
  $message = t("The number of @name - statspro->get_aggregate_stat(@type) - should be '@correct'. It is '@wrong'.", array(
    '@correct' => var_export($correct, TRUE),
    '@wrong' => var_export($result['amount'], TRUE),
    '@name' => $this
      ->getTypeName($type),
    '@type' => $type,
  ));
  $this
    ->assertEqual($result['amount'], $correct, $message, $group);
}