public function SkinrApiTestCase::testSkinrConfigInfo in Skinr 8.2
Tests hook_skinr_config_info().
File
- src/
Tests/ skinr.test, line 451 - Tests for the Skinr module.
Class
- SkinrApiTestCase
- Tests API functionality.
Namespace
Drupal\tracker\TestsCode
public function testSkinrConfigInfo() {
// Verify that skinr_get_config_info() finds all existing and compatible
// hook_skinr_config_info() implementations.
$config = skinr_get_config_info();
// Skinr's own implementation in skinr.skinr.inc should always be found.
$this
->assertTrue(isset($config['system']), 'hook_skinr_config_info() in $module.skinr.inc found.');
unset($config['system']);
// Skinr's implementation on behalf of Node module in modules/node.skinr.inc
// should be found.
$this
->assertTrue(isset($config['node']), 'hook_skinr_config_info() in a custom path found.');
unset($config['node']);
// Ensure that skinr_test_incompatible is not included.
$this
->verbose(highlight_string('<?php ' . var_export($config, TRUE), TRUE));
$this
->assertTrue(!isset($config['skinr_test_incompatible']), 'Incompatible hook_skinr_config_info() not found.');
// After asserting all expected, the list of skins should be empty.
$this
->assertTrue(empty($config), 'No unexpected skins found.');
}