aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/plugins/PluginMarkdownTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/plugins/PluginMarkdownTest.php')
-rw-r--r--tests/plugins/PluginMarkdownTest.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/plugins/PluginMarkdownTest.php b/tests/plugins/PluginMarkdownTest.php
index 17ef2280..d359b2a1 100644
--- a/tests/plugins/PluginMarkdownTest.php
+++ b/tests/plugins/PluginMarkdownTest.php
@@ -16,7 +16,7 @@ class PluginMarkdownTest extends PHPUnit_Framework_TestCase
16 /** 16 /**
17 * Reset plugin path 17 * Reset plugin path
18 */ 18 */
19 function setUp() 19 public function setUp()
20 { 20 {
21 PluginManager::$PLUGINS_PATH = 'plugins'; 21 PluginManager::$PLUGINS_PATH = 'plugins';
22 } 22 }
@@ -25,7 +25,7 @@ class PluginMarkdownTest extends PHPUnit_Framework_TestCase
25 * Test render_linklist hook. 25 * Test render_linklist hook.
26 * Only check that there is basic markdown rendering. 26 * Only check that there is basic markdown rendering.
27 */ 27 */
28 function testMarkdownLinklist() 28 public function testMarkdownLinklist()
29 { 29 {
30 $markdown = '# My title' . PHP_EOL . 'Very interesting content.'; 30 $markdown = '# My title' . PHP_EOL . 'Very interesting content.';
31 $data = array( 31 $data = array(
@@ -45,7 +45,7 @@ class PluginMarkdownTest extends PHPUnit_Framework_TestCase
45 * Test render_daily hook. 45 * Test render_daily hook.
46 * Only check that there is basic markdown rendering. 46 * Only check that there is basic markdown rendering.
47 */ 47 */
48 function testMarkdownDaily() 48 public function testMarkdownDaily()
49 { 49 {
50 $markdown = '# My title' . PHP_EOL . 'Very interesting content.'; 50 $markdown = '# My title' . PHP_EOL . 'Very interesting content.';
51 $data = array( 51 $data = array(
@@ -69,7 +69,7 @@ class PluginMarkdownTest extends PHPUnit_Framework_TestCase
69 /** 69 /**
70 * Test reverse_text2clickable(). 70 * Test reverse_text2clickable().
71 */ 71 */
72 function testReverseText2clickable() 72 public function testReverseText2clickable()
73 { 73 {
74 $text = 'stuff http://hello.there/is=someone#here otherstuff'; 74 $text = 'stuff http://hello.there/is=someone#here otherstuff';
75 $clickableText = text2clickable($text, ''); 75 $clickableText = text2clickable($text, '');
@@ -80,7 +80,7 @@ class PluginMarkdownTest extends PHPUnit_Framework_TestCase
80 /** 80 /**
81 * Test reverse_nl2br(). 81 * Test reverse_nl2br().
82 */ 82 */
83 function testReverseNl2br() 83 public function testReverseNl2br()
84 { 84 {
85 $text = 'stuff' . PHP_EOL . 'otherstuff'; 85 $text = 'stuff' . PHP_EOL . 'otherstuff';
86 $processedText = nl2br($text); 86 $processedText = nl2br($text);
@@ -91,7 +91,7 @@ class PluginMarkdownTest extends PHPUnit_Framework_TestCase
91 /** 91 /**
92 * Test reverse_space2nbsp(). 92 * Test reverse_space2nbsp().
93 */ 93 */
94 function testReverseSpace2nbsp() 94 public function testReverseSpace2nbsp()
95 { 95 {
96 $text = ' stuff' . PHP_EOL . ' otherstuff and another'; 96 $text = ' stuff' . PHP_EOL . ' otherstuff and another';
97 $processedText = space2nbsp($text); 97 $processedText = space2nbsp($text);
@@ -102,7 +102,7 @@ class PluginMarkdownTest extends PHPUnit_Framework_TestCase
102 /** 102 /**
103 * Test sanitize_html(). 103 * Test sanitize_html().
104 */ 104 */
105 function testSanitizeHtml() 105 public function testSanitizeHtml()
106 { 106 {
107 $input = '< script src="js.js"/>'; 107 $input = '< script src="js.js"/>';
108 $input .= '< script attr>alert(\'xss\');</script>'; 108 $input .= '< script attr>alert(\'xss\');</script>';
@@ -119,7 +119,7 @@ class PluginMarkdownTest extends PHPUnit_Framework_TestCase
119 /** 119 /**
120 * Test the no markdown tag. 120 * Test the no markdown tag.
121 */ 121 */
122 function testNoMarkdownTag() 122 public function testNoMarkdownTag()
123 { 123 {
124 $str = 'All _work_ and `no play` makes Jack a *dull* boy.'; 124 $str = 'All _work_ and `no play` makes Jack a *dull* boy.';
125 $data = array( 125 $data = array(
@@ -158,7 +158,7 @@ class PluginMarkdownTest extends PHPUnit_Framework_TestCase
158 /** 158 /**
159 * Test that a close value to nomarkdown is not understand as nomarkdown (previous value `.nomarkdown`). 159 * Test that a close value to nomarkdown is not understand as nomarkdown (previous value `.nomarkdown`).
160 */ 160 */
161 function testNoMarkdownNotExcactlyMatching() 161 public function testNoMarkdownNotExcactlyMatching()
162 { 162 {
163 $str = 'All _work_ and `no play` makes Jack a *dull* boy.'; 163 $str = 'All _work_ and `no play` makes Jack a *dull* boy.';
164 $data = array( 164 $data = array(
@@ -176,7 +176,7 @@ class PluginMarkdownTest extends PHPUnit_Framework_TestCase
176 /** 176 /**
177 * Test hashtag links processed with markdown. 177 * Test hashtag links processed with markdown.
178 */ 178 */
179 function testMarkdownHashtagLinks() 179 public function testMarkdownHashtagLinks()
180 { 180 {
181 $md = file_get_contents('tests/plugins/resources/markdown.md'); 181 $md = file_get_contents('tests/plugins/resources/markdown.md');
182 $md = format_description($md); 182 $md = format_description($md);