You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

50 lines
1.3 KiB

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