public function test_getAllDimensions_shouldReturnActionVisitAndConversionDimensions()
{
Manager::getInstance()->loadPlugins(array('Actions', 'Events', 'DevicesDetector', 'Goals'));
$dimensions = Dimension::getAllDimensions();
$this->assertGreaterThan(20, count($dimensions));
$foundConversion = false;
$foundVisit = false;
$foundAction = false;
foreach ($dimensions as $dimension) {
if ($dimension instanceof \Piwik\Plugin\Dimension\ConversionDimension) {
$foundConversion = true;
} else {
if ($dimension instanceof \Piwik\Plugin\Dimension\ActionDimension) {
$foundAction = true;
} else {
if ($dimension instanceof \Piwik\Plugin\Dimension\VisitDimension) {
$foundVisit = true;
} else {
$this->fail('Unexpected dimension class found');
}
}
}
$this->assertRegExp('/Piwik.Plugins.(Actions|Events|DevicesDetector|Goals).Columns/', get_class($dimension));
}
$this->assertTrue($foundConversion);
$this->assertTrue($foundAction);
$this->assertTrue($foundVisit);
}