1*91a2d0d1SMichael Große<?php 2*91a2d0d1SMichael Große/** 3*91a2d0d1SMichael Große * tests or the class helper_plugin_publish of the publish plugin 4*91a2d0d1SMichael Große * 5*91a2d0d1SMichael Große * @group plugin_publish 6*91a2d0d1SMichael Große * @group plugins 7*91a2d0d1SMichael Große */ 8*91a2d0d1SMichael Großeclass helper_plugin_publish_test extends DokuWikiTest { 9*91a2d0d1SMichael Große 10*91a2d0d1SMichael Große public function setUp() { 11*91a2d0d1SMichael Große parent::setUp(); 12*91a2d0d1SMichael Große } 13*91a2d0d1SMichael Große 14*91a2d0d1SMichael Große protected $pluginsEnabled = array('publish',); 15*91a2d0d1SMichael Große 16*91a2d0d1SMichael Große /** 17*91a2d0d1SMichael Große * 18*91a2d0d1SMichael Große */ 19*91a2d0d1SMichael Große public function test_in_namespace() { 20*91a2d0d1SMichael Große 21*91a2d0d1SMichael Große /** @var helper_plugin_publish $helper */ 22*91a2d0d1SMichael Große $helper = plugin_load('helper', 'publish'); 23*91a2d0d1SMichael Große $this->assertTrue($helper->in_namespace("de:sidebar en:sidebar", 'de:sidebar')); 24*91a2d0d1SMichael Große $this->assertTrue($helper->in_namespace("de:sidebar en:sidebar", 'en:sidebar')); 25*91a2d0d1SMichael Große } 26*91a2d0d1SMichael Große 27*91a2d0d1SMichael Große public function test_isActive() { 28*91a2d0d1SMichael Große global $conf; 29*91a2d0d1SMichael Große 30*91a2d0d1SMichael Große $conf['plugin']['publish']['no_apr_namespaces'] = 'de:sidebar en:sidebar'; 31*91a2d0d1SMichael Große 32*91a2d0d1SMichael Große /** @var helper_plugin_publish $helper */ 33*91a2d0d1SMichael Große $helper = plugin_load('helper', 'publish'); 34*91a2d0d1SMichael Große 35*91a2d0d1SMichael Große $this->assertFalse($helper->isActive('de:sidebar'), 'de:sidebar is still listed as active'); 36*91a2d0d1SMichael Große $this->assertFalse($helper->isActive('en:sidebar'), 'en:sidebar is still listed as active'); 37*91a2d0d1SMichael Große } 38*91a2d0d1SMichael Große 39*91a2d0d1SMichael Große}