public function FusionApplyApiTestCase::testFusionApplyGroupInfo in Fusion Accelerator 7
Same name and namespace in other branches
- 7.2 fusion_apply/tests/fusion_apply.test \FusionApplyApiTestCase::testFusionApplyGroupInfo()
Tests hook_fusion_apply_group_info().
File
- fusion_apply/
tests/ fusion_apply.test, line 260 - Tests for the Fusion Apply module.
Class
- FusionApplyApiTestCase
- Tests API functionality.
Code
public function testFusionApplyGroupInfo() {
$group_info = fusion_apply_get_group_info();
// Verify that default skin groups are found.
$all_expected = array(
'general' => array(
'title' => t('General'),
'weight' => -10,
),
'box' => array(
'title' => t('Box styles'),
),
'typography' => array(
'title' => t('Typography'),
),
'layout' => array(
'title' => t('Layout'),
),
);
foreach ($all_expected as $name => $expected) {
// We don't want to be pixel-perfect here.
if (isset($group_info[$name]['description'])) {
$expected['description'] = $group_info[$name]['description'];
}
$expected += array(
'description' => '',
'weight' => 0,
);
$this
->assertEqual($group_info[$name], $expected, t('Group %group found:<pre>@data</pre>', array(
'%group' => $name,
'@data' => var_export($group_info[$name], TRUE),
)));
unset($group_info[$name]);
}
// After asserting all expected, the list of extensions should be empty.
$this
->assertTrue(empty($group_info), 'No unexpected groups found.');
}