コード例 #1
0
ファイル: creole.test.php プロジェクト: araname/plugin-creole
 function setUp()
 {
     global $conf;
     parent::setUp();
     $conf['plugin']['creole']['precedence'] = 'Creole';
     $conf['plugin']['creole']['linebreak'] = 'Whitespace';
 }
コード例 #2
0
 /**
  * Default teardown
  *
  * we always make sure the database is clear
  */
 protected function tearDown()
 {
     parent::tearDown();
     /** @var \helper_plugin_struct_db $db */
     $db = plugin_load('helper', 'struct_db');
     $db->resetDB();
 }
コード例 #3
0
ファイル: parser.inc.php プロジェクト: richmahn/Door43
 function setUp()
 {
     parent::setUp();
     $this->P = new Doku_Parser();
     $this->H = new Doku_Handler();
     $this->P->Handler =& $this->H;
 }
コード例 #4
0
 /**
  * @coversNothing
  */
 public function tearDown()
 {
     /** @var helper_plugin_move_plan $plan  */
     $plan = plugin_load('helper', 'move_plan');
     $plan->abort();
     parent::tearDown();
 }
コード例 #5
0
    function setUp() {
        $this->pluginsEnabled = array(
            'testing'
        );

        parent::setUp();
    }
コード例 #6
0
 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     // copy CSS test file to test directory
     TestUtils::rcopy(DOKU_INC . '_test/data/tmp', DOKU_INC . 'lib/plugins/odt/_test/dw_css_with_wrap.css');
     TestUtils::rcopy(DOKU_INC . '_test/data/tmp', DOKU_INC . 'lib/plugins/odt/_test/dw_css_without_extra_wrap.css');
 }
コード例 #7
0
 function setUp()
 {
     parent::setUp();
     global $AUTH_ACL;
     global $auth;
     $this->oldAuthAcl = $AUTH_ACL;
     $auth = new DokuWiki_Auth_Plugin();
 }
コード例 #8
0
 public function setUp()
 {
     parent::setUp();
     saveWikiText('testpage', 'Foo bar baz.', 'Test initialization');
     saveWikiText('notfound', 'Foon barn bazn.', 'Test initialization');
     idx_addPage('testpage');
     idx_addPage('notfound');
 }
コード例 #9
0
ファイル: CreateNow.test.php プロジェクト: richmahn/Door43
 public function setUp()
 {
     $this->pluginsEnabled[] = 'include';
     $this->pluginsEnabled[] = 'door43translation';
     $this->pluginsEnabled[] = 'door43shared';
     $this->pluginsEnabled[] = 'door43obs';
     parent::setUp();
 }
コード例 #10
0
 /**
  * Create some page namespace structure
  */
 function setUp()
 {
     $pages = array('animals:mammals:bear:brownbear', 'animals:mammals:bear:blackbear', 'animals:mammals:cute:otter', 'animals:mammals:cute:cat', 'animals:mammals:cute:dog', 'animals:insects:butterfly:fly', 'animals:insects:butterfly:moth', 'animals:monkey', 'humans:programmers:andi', 'humans:programmers:joe', 'humans:programmers:john', 'yeti');
     foreach ($pages as $page) {
         saveWikiText($page, $page, 'test setup');
     }
     parent::setUp();
 }
コード例 #11
0
 /**
  * Setup the testing environment
  *
  * @author Johnathan Pulos <*****@*****.**>
  */
 public function setUp()
 {
     parent::setUp();
     $this->plugin = new action_plugin_revhistory();
     $this->plugin->testing = true;
     $this->eventHandler = $this->getMockBuilder('Doku_Event')->setConstructorArgs(array('ACTION_ACT_PREPROCESS', 'revhistory'))->getMock();
     TestUtils::rcopy(TMP_DIR, dirname(__FILE__) . '/data/');
 }
コード例 #12
0
 function setup()
 {
     parent::setup();
     global $USERINFO;
     $USERINFO = array('pass' => '179ad45c6ce2cb97cf1029e212046e81', 'name' => 'Arthur Dent', 'mail' => '*****@*****.**', 'grps' => array('admin', 'user'));
     $_SERVER['REMOTE_USER'] = '******';
     $_SERVER['REMOTE_ADDR'] = '1.2.3.4';
 }
コード例 #13
0
 function setUp()
 {
     parent::setUp();
     $this->indexer = idx_get_indexer();
     $this->indexer->clear();
     saveWikiText($this->old_id, 'Old test content', 'Created old test page for indexer rename test');
     idx_addPage($this->old_id);
 }
コード例 #14
0
ファイル: ExportButtons.test.php プロジェクト: kidaa/Door43
 public function setUp()
 {
     self::$outputBuffer = '';
     $this->pluginsEnabled[] = 'include';
     $this->pluginsEnabled[] = 'door43translation';
     $this->pluginsEnabled[] = 'door43shared';
     $this->pluginsEnabled[] = 'door43obsdocupload';
     parent::setUp();
 }
コード例 #15
0
 function setUp()
 {
     parent::setUp();
     global $auth;
     global $AUTH_ACL;
     $this->oldAuth = $auth;
     $this->oldAuthAcl = $AUTH_ACL;
     $auth = new auth_acl_caseinsensitive_auth();
 }
コード例 #16
0
 public function setUp()
 {
     parent::setUp();
     $this->action = new action_plugin_data();
     $this->helper = plugin_load('helper', 'data');
     $this->db = $this->helper->_getDB();
     $this->db->query('INSERT INTO pages ( pid, page, title , class , lastmod) VALUES
         (?, ?, ?, ?, ?)', 1, 'test', 'title', 'class', time());
 }
コード例 #17
0
 /**
  * @coversNothing
  */
 public function tearDown()
 {
     /** @var helper_plugin_move_plan $plan  */
     $plan = plugin_load('helper', 'move_plan');
     $plan->abort();
     io_rmdir(DOKU_TMP_DATA . "pages/newns", true);
     io_rmdir(DOKU_TMP_DATA . "media/newns", true);
     io_rmdir(DOKU_TMP_DATA . "meta/newns", true);
     parent::tearDown();
 }
コード例 #18
0
ファイル: tar.test.php プロジェクト: richmahn/Door43
 public function setUp()
 {
     parent::setUp();
     if (extension_loaded('zlib')) {
         $this->extensions[] = 'tgz';
     }
     if (extension_loaded('bz2')) {
         $this->extensions[] = 'tbz';
     }
 }
コード例 #19
0
 public function setUp()
 {
     parent::setUp();
     saveWikiText('foo', "====== Page-Heading ======", 'summary');
     $req = new TestRequest();
     $req->get(array(), '/doku.php?id=foo');
     saveWikiText('testpage', "---- dataentry Testentry ----\n" . "test1_title: foo|bar\n" . "----\n", 'summary');
     //trigger save to db
     $req = new TestRequest();
     $req->get(array(), '/doku.php?id=testpage');
 }
コード例 #20
0
 public function setUp()
 {
     parent::setUp();
     $opts_file = dirname(DOKU_CONF) . '/data/meta/__move_opts';
     if (file_exists($opts_file)) {
         unlink($opts_file);
     }
     $file = "oldns:page01\tnewns:page01\n" . "oldns:page02\tnewns:page02\n" . "oldns:page03\tnewns:page03\n" . "oldns:page04\tnewns:page04\n" . "oldns:page05\tnewns:page05\n" . "oldns:page06\tnewns:page06\n" . "oldns:page07\tnewns:page07\n" . "oldns:page08\tnewns:page08\n" . "oldns:page09\tnewns:page09\n" . "oldns:page10\tnewns:page10\n" . "oldns:page11\tnewns:page11\n" . "oldns:page12\tnewns:page12\n" . "oldns:page13\tnewns:page13\n" . "oldns:page14\tnewns:page14\n" . "oldns:page15\tnewns:page15\n" . "oldns:page16\tnewns:page16\n" . "oldns:page17\tnewns:page17\n" . "oldns:page18\tnewns:page18";
     $file_path = dirname(DOKU_CONF) . '/data/meta/__move_pagelist';
     io_saveFile($file_path, $file);
 }
コード例 #21
0
 /**
  * Set up before test
  * @return nothing
  */
 public function setUp()
 {
     // Enable our plugin
     $this->pluginsEnabled[] = 'chunkprogress';
     // Restore our global variable because PHPUnit nukes it
     // NOTE: If this changes in utils.php it needs to change here too!
     global $CHUNKPROGRESS_STATUS_TAGS;
     $CHUNKPROGRESS_STATUS_TAGS = array("draft", "check", "review", "text", "discuss", "publish");
     // Continue with regular setup
     parent::setUp();
 }
コード例 #22
0
 public function setUp()
 {
     $this->pluginsEnabled[] = 'tag';
     parent::setUp();
     saveWikiText('tagged_page', '{{tag>mytag test2tag}}', 'Test');
     saveWikiText('negative_page', '{{tag>negative_tag mytag}}', 'Test setup');
     saveWikiText('third_page', '{{tag>third_tag}}', 'Test setup');
     idx_addPage('tagged_page');
     idx_addPage('negative_page');
     idx_addPage('third_page');
 }
コード例 #23
0
 /**
  * @coversNothing
  */
 public function tearDown()
 {
     global $conf;
     $dirs = array('indexdir', 'datadir', 'metadir', 'mediadir');
     foreach ($dirs as $dir) {
         io_rmdir($conf[$dir], true);
         mkdir($conf[$dir]);
     }
     $this->plan->abort();
     parent::tearDown();
 }
コード例 #24
0
 function setup()
 {
     parent::setup();
     global $cache_revinfo;
     $cache =& $cache_revinfo;
     if (isset($cache['nonexist'])) {
         unset($cache['nonexist']);
     }
     if (isset($cache['mailinglist'])) {
         unset($cache['mailinglist']);
     }
 }
コード例 #25
0
 public function setUp()
 {
     global $conf;
     $this->pluginsEnabled[] = 'tag';
     parent::setUp();
     $conf['plugin']['tag']['sortkey'] = 'ns';
     $this->helper = plugin_load('helper', 'tag');
     foreach ($this->pages as $page) {
         saveWikiText($page, '{{tag>mytag}}', 'Test');
         idx_addPage($page);
     }
 }
コード例 #26
0
 public function setUp()
 {
     $this->pluginsEnabled[] = 'include';
     parent::setUp();
     $this->helper = plugin_load('helper', 'include');
     saveWikiText('included', 'Example content with link [[#jump]]', 'Test setup');
     idx_addPage('test:included');
     saveWikiText('test:includefull', '{{page>..:included}}', 'Test setup');
     idx_addPage('test:includefull');
     saveWikiText('test:includefirst', '{{page>..:included&firstseconly}}', 'Test setup');
     idx_addPage('test:includefirst');
 }
コード例 #27
0
 public function setup()
 {
     global $conf;
     $this->pluginsEnabled[] = 'indexmenu';
     parent::setup();
     //$conf['plugin']['indexmenu']['headpage'] = '';
     //$conf['plugin']['indexmenu']['hide_headpage'] = false;
     //saveWikiText('titleonly:sub:test', "====== Title ====== \n content", 'created');
     //saveWikiText('test', "====== Title ====== \n content", 'created');
     //idx_addPage('titleonly:sub:test');
     //idx_addPage('test');
 }
コード例 #28
0
 public function setUp()
 {
     parent::setUp();
     global $USERINFO;
     $USERINFO = array('pass' => '179ad45c6ce2cb97cf1029e212046e81', 'name' => 'Arthur Dent', 'mail' => '*****@*****.**', 'grps' => array('admin', 'user'));
     global $default_server_vars;
     $default_server_vars['REMOTE_USER'] = '******';
     //Hack until Issue splitbrain/dokuwiki#1099 is fixed
     $_SERVER['REMOTE_USER'] = '******';
     global $conf;
     $conf['superuser'] = '******';
 }
コード例 #29
0
    public function setUp()
    {
        $this->pluginsEnabled[] = 'include';
        parent::setUp();
        $this->helper = plugin_load('helper', 'include');
        saveWikiText('wiki:included', <<<EOF
  * [[test|{{dokuwiki.png}}]]
  * [[#test|{{dokuwiki.png?w=200}}]]
  * [[doku>test|{{dokuwiki.png?w=300}}]]
  * [[test|{{https://www.dokuwiki.org/lib/tpl/dokuwiki/images/logo.png}}]]
EOF
, 'Test setup');
        idx_addPage('wiki:included');
        saveWikiText('test:include', '{{page>..:wiki:included}}', 'Test setup');
        idx_addPage('test:include');
    }
コード例 #30
0
ファイル: cache_use.test.php プロジェクト: richmahn/Door43
 function setUp()
 {
     global $ID, $conf;
     parent::setUp();
     $ID = 'cached';
     $file = wikiFN($ID);
     $conf['cachetime'] = 0;
     // ensure the value is not -1, which disables caching
     saveWikiText($ID, 'Content', 'Created');
     $this->cache = new cache_renderer($ID, $file, 'xhtml');
     $this->cache->storeCache('Test');
     // set the modification times explicitly (overcome Issue #694)
     $time = time();
     touch($file, $time - 1);
     touch($this->cache->cache, $time);
 }