function setUp() { parent::setUp(); $this->P = new Doku_Parser(); $this->H = new Doku_Handler(); $this->P->Handler =& $this->H; }
function setUp() { global $conf; parent::setUp(); $conf['plugin']['creole']['precedence'] = 'Creole'; $conf['plugin']['creole']['linebreak'] = 'Whitespace'; }
function setUp() { $this->pluginsEnabled = array( 'testing' ); parent::setUp(); }
function setUp() { global $USERINFO; parent::setUp(); $_SERVER['REMOTE_USER'] = '******'; $USERINFO['grps'] = array('foo', 'bar'); }
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); }
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'); }
/** * 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(); }
public function setUp() { $this->pluginsEnabled[] = 'include'; $this->pluginsEnabled[] = 'door43translation'; $this->pluginsEnabled[] = 'door43shared'; $this->pluginsEnabled[] = 'door43obs'; parent::setUp(); }
/** * 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/'); }
function setUp() { $this->importfile = tempnam(TMP_DIR, 'csv'); $this->old_files = $_FILES; $_FILES = array('import' => array('name' => 'import.csv', 'tmp_name' => $this->importfile, 'type' => 'text/plain', 'size' => 1, 'error' => 0)); $this->usermanager = new admin_mock_usermanager(); parent::setUp(); }
function setUp() { parent::setUp(); global $AUTH_ACL; global $auth; $this->oldAuthAcl = $AUTH_ACL; $auth = new DokuWiki_Auth_Plugin(); }
public function setUp() { self::$outputBuffer = ''; $this->pluginsEnabled[] = 'include'; $this->pluginsEnabled[] = 'door43translation'; $this->pluginsEnabled[] = 'door43shared'; $this->pluginsEnabled[] = 'door43obsdocupload'; parent::setUp(); }
function setUp() { parent::setUp(); global $auth; global $AUTH_ACL; $this->oldAuth = $auth; $this->oldAuthAcl = $AUTH_ACL; $auth = new auth_acl_caseinsensitive_auth(); }
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()); }
public function setUp() { parent::setUp(); if (extension_loaded('zlib')) { $this->extensions[] = 'tgz'; } if (extension_loaded('bz2')) { $this->extensions[] = 'tbz'; } }
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'); }
/** * 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(); }
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); }
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'); }
public function setUp() { parent::setUp(); global $USERINFO; global $conf; $conf['useacl'] = 1; $conf['superuser'] = '******'; $_SERVER['REMOTE_USER'] = '******'; //now it's testing as admin $USERINFO['grps'] = array('admin', 'user'); }
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'); }
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); } }
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'] = '******'; }
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'); }
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); }
function setUp() { header('X-Test: check headers working'); $header_check = function_exists('xdebug_get_headers') ? xdebug_get_headers() : headers_list(); if (empty($header_check)) { $this->markTestSkipped('headers not returned, perhaps your sapi does not return headers, try xdebug'); } else { header_remove('X-Test'); } parent::setUp(); global $conf; $conf['fetchsize'] = 500 * 1024; //500kb $conf['xsendfile'] = 0; global $MIME, $EXT, $CACHE, $INPUT; // variables fetch creates in global scope -- should this be in fetch? }
function setUp() { // check we can carry out these tests if (!file_exists(mediaFN($this->media))) { $this->markTestSkipped('Source image required for test'); } header('X-Test: check headers working'); $header_check = function_exists('xdebug_get_headers') ? xdebug_get_headers() : headers_list(); if (empty($header_check)) { $this->markTestSkipped('headers not returned, perhaps your sapi does not return headers, try xdebug'); } else { header_remove('X-Test'); } parent::setUp(); global $conf; $conf['xsendfile'] = 0; global $MIME, $EXT, $CACHE, $INPUT; // variables fetch creates in global scope -- should this be in fetch? }
public function setUp() { $this->pluginsEnabled[] = 'include'; $this->pluginsEnabled[] = 'door43translation'; $this->pluginsEnabled[] = 'door43shared'; $this->pluginsEnabled[] = 'door43obs'; /** @var $INPUT input */ global $INPUT; $INPUT->get->set('sourceLang', self::$srcNs); $INPUT->get->set('destinationLang', self::$destNs); // create source files in ./pages/en/obs $this->obsSrcDir = TMP_DIR . '/data/pages/' . self::$srcNs . '/obs'; if (!is_dir($this->obsSrcDir)) { mkdir($this->obsSrcDir, 0755, true); } file_put_contents($this->obsSrcDir . '/back-matter.txt', 'back-matter.txt'); file_put_contents($this->obsSrcDir . '/front-matter.txt', 'front-matter.txt'); file_put_contents($this->obsSrcDir . '/cover-matter.txt', 'cover-matter.txt'); // create source files in ./pages/templates/obs3/obs $this->templateDir = TMP_DIR . '/data/pages/templates'; if (!is_dir($this->templateDir)) { mkdir($this->templateDir, 0755, true); } $obs3Dir = $this->templateDir . '/obs3/obs'; if (!is_dir($obs3Dir)) { mkdir($obs3Dir, 0755, true); } file_put_contents($obs3Dir . '/sidebar.txt', 'sidebar.txt'); file_put_contents($obs3Dir . '/stories.txt', 'stories.txt'); // create source files in ./pages/templates (home.txt, sidebar.txt, status.txt) file_put_contents($this->templateDir . '/home.txt', 'home.txt'); file_put_contents($this->templateDir . '/sidebar.txt', 'sidebar.txt'); file_put_contents($this->templateDir . '/status.txt', 'status.txt'); file_put_contents($this->templateDir . '/obs3/obs.txt', 'obs.txt'); // create target namespace in ./pages/x-unit-test $this->destNsDir = TMP_DIR . '/data/pages/' . self::$destNs; if (!is_dir($this->destNsDir)) { mkdir($this->destNsDir, 0755, true); } parent::setUp(); }
public function setUp() { $this->pluginsEnabled[] = 'odt'; parent::setUp(); }
function setUp() { parent::setUp(); global $auth; $this->oldauth = $auth; }