function SkinrApiTestCase::testSkinrInvokeAll in Skinr 8.2
Test that module_invoke_all() can load a hook defined in hook_hook_info().
File
- src/
Tests/ skinr.test, line 336 - Tests for the Skinr module.
Class
- SkinrApiTestCase
- Tests API functionality.
Namespace
Drupal\tracker\TestsCode
function testSkinrInvokeAll() {
// Ensure functions from $module.skinr.inc in both module root and in
// custom paths are triggered.
$config_info = skinr_invoke_all('skinr_config_info');
$this
->verbose(highlight_string('<?php ' . var_export($config_info, TRUE), TRUE));
$this
->assertTrue(in_array('system', $config_info), 'Function triggered in $module.skinr.inc file auto-loaded by module_hook().');
$this
->assertTrue(in_array('node', $config_info), 'Function triggered in $module.skinr.inc file in custom path.');
// Ensure that skinr_test_incompatible is not included.
$this
->assertTrue(!in_array('skinr_test_incompatible', $config_info), 'Function in incompatible module not triggered.');
}