1<?php 2 3/** 4 * tests for the template button of the move plugin 5 * 6 * @author Michael Große <grosse@cosmocode.de> 7 * @group plugin_move 8 * @group plugins 9 */ 10class move_tpl_test extends DokuWikiTest { 11 12 public function setUp(): void { 13 parent::setUp(); 14 } 15 16 protected $pluginsEnabled = array('move'); 17 18 /** 19 * @coversNothing 20 * Integration-ish kind of test testing action_plugin_move_rename::handle_pagetools 21 *//* 22 function test_tpl () { 23 saveWikiText('wiki:foo:start', '[[..:..:one_ns_up:]]', 'Test setup'); 24 idx_addPage('wiki:foo:start'); 25 26 $request = new TestRequest(); 27 $response = $request->get(array(),'/doku.php?id=wiki:foo:start'); 28 29 $this->assertTrue(strstr($response->getContent(),'class="plugin_move_page"') !== false); 30 }*/ 31 32 /** 33 * @covers action_plugin_move_rename::renameOkay 34 */ 35 function test_renameOkay() { 36 global $conf; 37 global $USERINFO; 38 $conf['superuser'] = 'john'; 39 $_SERVER['REMOTE_USER'] = 'john'; 40 $USERINFO['grps'] = array('admin','user'); 41 42 saveWikiText('wiki:foo:start', '[[..:..:one_ns_up:]]', 'Test setup'); 43 idx_addPage('wiki:foo:start'); 44 45 $move_rename = new action_plugin_move_rename(); 46 $this->assertTrue($move_rename->renameOkay('wiki:foo:start')); 47 48 } 49} 50