public function SkinrContextApiTestCase::testSkinrContextGroupDefaultsDuplicates in Skinr 8.2
Same name and namespace in other branches
- 7.2 skinr_context/tests/skinr_context.test \SkinrContextApiTestCase::testSkinrContextGroupDefaultsDuplicates()
Test default skin configurations (in code) with duplicates.
File
- skinr_context/
tests/ skinr_context.test, line 151 - Tests for the Skinr Context module.
Class
- SkinrContextApiTestCase
- Tests Skinr Context API functionality.
Code
public function testSkinrContextGroupDefaultsDuplicates() {
$gid = 'block:system__user-menu:default';
module_enable(array(
'skinr_context_test_default',
));
$default_groups = _skinr_context_group_get_defaults();
$this
->verbose(highlight_string('<?php ' . print_r($default_groups, TRUE), TRUE));
// Clear caches.
drupal_static_reset('_skinr_context_group_get_defaults');
module_enable(array(
'skinr_context_test_default_duplicate',
));
$default_groups = _skinr_context_group_get_defaults();
$this
->verbose(highlight_string('<?php ' . print_r($default_groups, TRUE), TRUE));
$this
->assertFalse(is_array($default_groups[$gid]), 'Default skin configuration group replaced its duplicate.');
// Clean up.
module_disable(array(
'skinr_context_test_default_duplicate',
));
drupal_static_reset('_skinr_context_group_get_defaults');
}