1<?php
2/**
3 * @group plugin_data
4 * @group plugins
5 */
6class helper_plugin_data_test_aliases extends DokuWikiTest {
7
8    protected $pluginsEnabled = array('data', 'sqlite');
9
10    public function testAliases() {
11        $helper = new helper_plugin_data();
12        $db = $helper->_getDB();
13        $this->assertTrue($db !== false);
14        $db->query("INSERT INTO aliases (name, type, prefix, postfix, enum) VALUES (?,?,?,?,?)",
15            'alias', 'wiki', '[[', ']]', '');
16
17        $expect = array(
18            'alias' => array(
19                'type' => 'wiki',
20                'prefix' => '[[',
21                'postfix' => ']]'
22            )
23        );
24        $this->assertEquals($expect, $helper->_aliases());
25
26    }
27}
28