1<?php 2 3/** 4 * @group plugin_siteexport 5 * @group plugins 6 */ 7class SiteexportMoveTest extends DokuWikiTest { 8 public function setup() { 9 $this->pluginsEnabled[] = 'siteexport'; 10 $this->pluginsEnabled[] = 'move'; 11 parent::setup(); 12 } 13 14 public function test_move() { 15 /** @var $move helper_plugin_move_op */ 16 $move = plugin_load('helper', 'move_op'); 17 if (!$move) return; // disable the test when move is not installed 18 saveWikiText('pagetomove', '<toc> 19 * [[index|Index of the page]] 20 * [[foo:bar|Index of the sub namespace]] 21 * [[foo:index|Index of the sub/sub namespace]] 22 * [[.:foo:page|Page in the sub namespace]] 23</toc>', 'testcase created'); 24 idx_addPage('pagetomove'); 25 $this->assertTrue($move->movePage('pagetomove', 'test:movedpage')); 26 $this->assertEquals('<toc> 27 * [[:index|Index of the page]] 28 * [[foo:bar|Index of the sub namespace]] 29 * [[foo:index|Index of the sub/sub namespace]] 30 * [[foo:page|Page in the sub namespace]] 31</toc>',rawWiki('test:movedpage')); 32 } 33} 34