Skip to content

Commit

Permalink
Change back to get_post()
Browse files Browse the repository at this point in the history
  • Loading branch information
jrfnl committed May 30, 2014
1 parent 8f2ebcd commit fa56a38
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/test-class-wpseo-frontend.php
Original file line number Diff line number Diff line change
Expand Up @@ -735,13 +735,13 @@ public function test_rss_replace_vars() {

// create and go to post
$post_id = $this->factory->post->create();
$post = $this->factory->post->get_object_by_id( $post_id );
$this->go_to( get_permalink( $post_id ) );

// input
$text = 'Some text with some RSS Variables. Written by %%AUTHORLINK%%, the post is %%POSTLINK%% on the blog %%BLOGLINK%%. %%BLOGDESCLINK%%.';

// generate expected output
$post = get_post( $post_id );
$author_link = '<a rel="nofollow" rel="author" href="' . esc_url( get_author_posts_url( $post->post_author ) ) . '">' . get_the_author() . '</a>';
$post_link = '<a rel="nofollow" href="' . esc_url( get_permalink() ) . '">' . get_the_title() . '</a>';
$blog_link = '<a rel="nofollow" href="' . esc_url( get_bloginfo( 'url' ) ) . '">' . get_bloginfo( 'name' ) . '</a>';
Expand Down
2 changes: 1 addition & 1 deletion tests/test-wpseo-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function test_wpseo_replace_vars() {
);

// get post
$post = $this->factory->post->get_object_by_id( $post_id );
$post = get_post( $post_id );

$input = '%%title%% %%excerpt%% %%date%% %%name%%';
$expected = 'Post_Title Post_Excerpt '. mysql2date( get_option( 'date_format' ), $post->post_date , true ) . ' User_Nicename';
Expand Down

0 comments on commit fa56a38

Please sign in to comment.