1<?php
2
3//this has to be set up to right path
4require_once DOKU_INC . 'lib/plugins/latexit/classes/LabelHandler.php';
5
6/**
7 * LabelHandler tests for the latexit plugin
8 *
9 * @group plugin_latexit_classes
10 * @group plugin_latexit
11 * @group plugins
12 */
13class labelhandler_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 Label Handler.
23     * @var LabelHandler
24     */
25    protected $l;
26
27    /**
28     * Prepares the testing environment.
29     */
30    public function setUp() {
31        parent::setUp();
32        $this->l = LabelHandler::getInstance();
33    }
34
35    /**
36     * Testing newLabel method.
37     */
38    public function test_newLabel() {
39        $this->assertEquals("label", $this->l->newLabel("label"));
40        $this->assertEquals("stitek", $this->l->newLabel("stitek"));
41        $this->assertEquals("label2", $this->l->newLabel("label"));
42        $this->assertEquals("label3", $this->l->newLabel("label"));
43    }
44
45}
46