1<?php 2 3//this has to be set up to right path 4require_once DOKU_INC . 'lib/plugins/latexit/classes/RecursionHandler.php'; 5 6/** 7 * RecursionHandler tests for the latexit plugin 8 * 9 * @group plugin_latexit_classes 10 * @group plugin_latexit 11 * @group plugins 12 */ 13class recursionhandler_plugin_latexit_test extends DokuWikiTest { 14 15 /** 16 * These plugins will be loaded for testing. 17 * @var array 18 */ 19 protected $pluginsEnabled = array('latexit', 'mathjax', 'imagereference', 'zotero'); 20 21 /** 22 * Variable to store the instance of the Recursion Handler. 23 * @var RecursionHandler 24 */ 25 protected $r; 26 27 /** 28 * Prepares the testing environment. 29 */ 30 public function setUp() { 31 parent::setUp(); 32 $this->r = RecursionHandler::getInstance(); 33 } 34 35 /** 36 * Testing disallow, insert and remove methods. 37 */ 38 public function test_disallow() { 39 $this->r->insert("page"); 40 $this->assertTrue($this->r->disallow("page")); 41 $this->assertFalse($this->r->disallow("anotherpage")); 42 $this->r->remove("page"); 43 $this->assertFalse($this->r->disallow("page")); 44 } 45 46} 47