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