xref: /plugin/publish/_test/mail.unit.test.php (revision abc3ac649f6e32388640757ab4013e2344b0919f)
1*abc3ac64SMichael Große<?php
2*abc3ac64SMichael Große/**
3*abc3ac64SMichael Große * Unittests for the mail functionality of the publish plugin
4*abc3ac64SMichael Große *
5*abc3ac64SMichael Große * @group plugin_publish
6*abc3ac64SMichael Große * @group plugin_publish_unittests
7*abc3ac64SMichael Große * @group plugins
8*abc3ac64SMichael Große * @group unittests
9*abc3ac64SMichael Große * @author Michael Große <grosse@cosmocode.de>
10*abc3ac64SMichael Große */
11*abc3ac64SMichael Großeclass publish_mail_unit_test extends DokuWikiTest {
12*abc3ac64SMichael Große
13*abc3ac64SMichael Große    protected $pluginsEnabled = array('publish');
14*abc3ac64SMichael Große
15*abc3ac64SMichael Große    /**
16*abc3ac64SMichael Große     * @covers action_plugin_publish_mail::difflink
17*abc3ac64SMichael Große     */
18*abc3ac64SMichael Große    function test_difflink () {
19*abc3ac64SMichael Große        global $ID;
20*abc3ac64SMichael Große        $ID = 'wiki:syntax';
21*abc3ac64SMichael Große        $mail = new action_plugin_publish_mail;
22*abc3ac64SMichael Große        $actual_difflink = $mail->difflink('wiki:syntax','1','2');
23*abc3ac64SMichael Große        print_r($actual_difflink);
24*abc3ac64SMichael Große        $this->markTestIncomplete('Test must yet be implemented.');
25*abc3ac64SMichael Große    }
26*abc3ac64SMichael Große
27*abc3ac64SMichael Große    /**
28*abc3ac64SMichael Große     * @covers action_plugin_publish_mail::difflink
29*abc3ac64SMichael Große     */
30*abc3ac64SMichael Große    function test_apprejlink () {
31*abc3ac64SMichael Große        global $ID;
32*abc3ac64SMichael Große        $ID = 'wiki:syntax';
33*abc3ac64SMichael Große        $mail = new action_plugin_publish_mail;
34*abc3ac64SMichael Große        $actual_apprejlink = $mail->apprejlink('wiki:syntax','1');
35*abc3ac64SMichael Große        print_r($actual_apprejlink);
36*abc3ac64SMichael Große        $expected_apprejlink = 'http://wiki.example.com/doku.php?id=wiki:syntax&rev=1&do=edit&suggestfrom=';
37*abc3ac64SMichael Große        $this->assertSame($expected_apprejlink,$actual_apprejlink);
38*abc3ac64SMichael Große        $this->markTestIncomplete('Test must yet be implemented.');
39*abc3ac64SMichael Große    }
40*abc3ac64SMichael Große}
41