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