diff options
author | ArthurHoaro <arthur@hoa.ro> | 2018-02-02 19:23:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-02 19:23:26 +0100 |
commit | a381c373b30ed04001ea31ff5c38e077edacaf18 (patch) | |
tree | ece5f4a9cf7e7d3a0ae5088f1f453cb572f02b3d /tests/plugins | |
parent | bc3ce7ec2a652eec1441774958050cf83105560a (diff) | |
parent | 50142efd1b4b826f60b1e5673dba5ccbe26e0108 (diff) | |
download | Shaarli-a381c373b30ed04001ea31ff5c38e077edacaf18.tar.gz Shaarli-a381c373b30ed04001ea31ff5c38e077edacaf18.tar.zst Shaarli-a381c373b30ed04001ea31ff5c38e077edacaf18.zip |
Merge pull request #1074 from kalvn/feature/dailymarkdown
Executes daily hooks before creating columns.
Diffstat (limited to 'tests/plugins')
-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 | /** |