aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorkalvn <kalvnthereal@gmail.com>2018-02-01 13:16:58 +0100
committerkalvn <kalvnthereal@gmail.com>2018-02-01 13:16:58 +0100
commit50142efd1b4b826f60b1e5673dba5ccbe26e0108 (patch)
tree6cffd9e5e733e10afcfc3010dbeeb4f08bb32f62 /tests
parent499bd43c37a6ee3d13dabe8bdd0bb449ae57122a (diff)
downloadShaarli-50142efd1b4b826f60b1e5673dba5ccbe26e0108.tar.gz
Shaarli-50142efd1b4b826f60b1e5673dba5ccbe26e0108.tar.zst
Shaarli-50142efd1b4b826f60b1e5673dba5ccbe26e0108.zip
Executes daily hooks before creating columns.
Diffstat (limited to 'tests')
-rw-r--r--tests/plugins/PluginMarkdownTest.php28
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 /**