1<?php
2/**
3 * @group plugin_data
4 * @group plugins
5 */
6class data_action_plugin_edit_button_test extends DokuWikiTest {
7
8    protected $pluginsEnabled = array('data', 'sqlite');
9
10    function testSetName() {
11        $action = new action_plugin_data();
12        $data = array(
13            'target' => 'plugin_data'
14        );
15        $event = new Doku_Event('', $data);
16        $action->_editbutton($event, null);
17
18        $this->assertTrue(isset($data['name']));
19    }
20
21    function testWrongTarget() {
22        $action = new action_plugin_data();
23        $data = array(
24            'target' => 'default target'
25        );
26        $action->_editbutton($data, null);
27
28        $this->assertFalse(isset($data['name']));
29    }
30
31}
32