diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/plugins/PluginMarkdownTest.php | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/tests/plugins/PluginMarkdownTest.php b/tests/plugins/PluginMarkdownTest.php index 96891f1f..ddc2728d 100644 --- a/tests/plugins/PluginMarkdownTest.php +++ b/tests/plugins/PluginMarkdownTest.php | |||
@@ -58,20 +58,17 @@ class PluginMarkdownTest extends PHPUnit_Framework_TestCase | |||
58 | $markdown = '# My title' . PHP_EOL . 'Very interesting content.'; | 58 | $markdown = '# My title' . PHP_EOL . 'Very interesting content.'; |
59 | $data = array( | 59 | $data = array( |
60 | // Columns data | 60 | // Columns data |
61 | 'cols' => array( | 61 | 'linksToDisplay' => array( |
62 | // First, second, third. | 62 | // nth link |
63 | 0 => array( | 63 | 0 => array( |
64 | // nth link | 64 | 'formatedDescription' => $markdown, |
65 | 0 => array( | ||
66 | 'formatedDescription' => $markdown, | ||
67 | ), | ||
68 | ), | 65 | ), |
69 | ), | 66 | ), |
70 | ); | 67 | ); |
71 | 68 | ||
72 | $data = hook_markdown_render_daily($data, $this->conf); | 69 | $data = hook_markdown_render_daily($data, $this->conf); |
73 | $this->assertNotFalse(strpos($data['cols'][0][0]['formatedDescription'], '<h1>')); | 70 | $this->assertNotFalse(strpos($data['linksToDisplay'][0]['formatedDescription'], '<h1>')); |
74 | $this->assertNotFalse(strpos($data['cols'][0][0]['formatedDescription'], '<p>')); | 71 | $this->assertNotFalse(strpos($data['linksToDisplay'][0]['formatedDescription'], '<p>')); |
75 | } | 72 | } |
76 | 73 | ||
77 | /** | 74 | /** |
@@ -148,21 +145,18 @@ class PluginMarkdownTest extends PHPUnit_Framework_TestCase | |||
148 | 145 | ||
149 | $data = array( | 146 | $data = array( |
150 | // Columns data | 147 | // Columns data |
151 | 'cols' => array( | 148 | 'linksToDisplay' => array( |
152 | // First, second, third. | 149 | // nth link |
153 | 0 => array( | 150 | 0 => array( |
154 | // nth link | 151 | 'formatedDescription' => $str, |
155 | 0 => array( | 152 | 'tags' => NO_MD_TAG, |
156 | 'formatedDescription' => $str, | 153 | 'taglist' => array(), |
157 | 'tags' => NO_MD_TAG, | ||
158 | 'taglist' => array(), | ||
159 | ), | ||
160 | ), | 154 | ), |
161 | ), | 155 | ), |
162 | ); | 156 | ); |
163 | 157 | ||
164 | $data = hook_markdown_render_daily($data, $this->conf); | 158 | $data = hook_markdown_render_daily($data, $this->conf); |
165 | $this->assertEquals($str, $data['cols'][0][0]['formatedDescription']); | 159 | $this->assertEquals($str, $data['linksToDisplay'][0]['formatedDescription']); |
166 | } | 160 | } |
167 | 161 | ||
168 | /** | 162 | /** |