- Updates unit tests

This commit is contained in:
Vlad
2016-12-18 22:46:42 -05:00
parent 9698cf2d2e
commit 9095482af2
7 changed files with 322 additions and 46 deletions

View File

@@ -94,13 +94,13 @@ class ShortcodesTest extends MailPoetTest {
'<a data-post-id="10" href="#">another post</a>' .
'<a href="#">not post</a>';
$result =
$shortcodes_object->process(array('[newsletter:subject]'));
$shortcodes_object->process(array('[newsletter:subject]'), $content);
expect($result[0])->equals($this->newsletter->subject);
$result =
$shortcodes_object->process(array('[newsletter:total]'), $content);
expect($result[0])->equals(2);
$result =
$shortcodes_object->process(array('[newsletter:post_title]'));
$shortcodes_object->process(array('[newsletter:post_title]'), $content);
$wp_post = get_post($this->WP_post);
expect($result['0'])->equals($wp_post->post_title);
}