function SkinrUISkinableTestCase::testHookSkinable in Skinr 7.2
Same name and namespace in other branches
- 8.2 skinr_ui/src/Tests/skinr_ui.test \SkinrUISkinableTestCase::testHookSkinable()
Tests if hooks are properly identified as skinable.
File
- tests/
skinr_ui.test, line 294 - Tests for the Skinr UI module.
Class
- SkinrUISkinableTestCase
- Tests whether or not elements are skinable in Skinr UI.
Code
function testHookSkinable() {
// This test doesn't include the * (all) theme hook option.
// Only page nodes are allowed.
$this
->drupalGet('skinr-ui-test/element-skinable/node/page');
$this
->assertText('true', t('Element node__page is skinable.'));
$this
->drupalGet('skinr-ui-test/element-skinable/node/article');
$this
->assertText('false', t('Element node__article is not skinable.'));
// All blocks are allowed.
$this
->drupalGet('skinr-ui-test/element-skinable/block/system__navigation');
$this
->assertText('true', t('Element block__system__navigation is skinable.'));
// Only page comments are allowed.
$this
->drupalGet('skinr-ui-test/element-skinable/comment/page');
$this
->assertText('true', t('Element comment__page is skinable.'));
$this
->drupalGet('skinr-ui-test/element-skinable/comment/panel');
$this
->assertText('false', t('Element comment__panel is not skinable.'));
// No regions are allowed.
$this
->drupalGet('skinr-ui-test/element-skinable/system/region__sidebar_first');
$this
->assertText('false', t('Element region__sidebar_first is not skinable.'));
}