Skip to content

Commit

Permalink
WIP: Cleanup risky test
Browse files Browse the repository at this point in the history
  • Loading branch information
theodesp committed Nov 22, 2023
1 parent 98d84e1 commit d6fbf56
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions plugins/faustwp/tests/integration/ReplacementCallbacksTests.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,18 +221,6 @@ public function test_post_link_returns_unfiltered_link_on_ajax_requests_to_gener
wp_set_current_user( null );
}

/**
* Tests preview_link_in_rest_response() returns preview link in draft mode.
*/
public function test_preview_link_in_rest_response_returns_preview_link_for_draft_posts() {
faustwp_update_setting( 'frontend_uri', 'http://moo' );
$response = new WP_REST_Response( $data=[] );
$response->data['link'] = get_permalink( $this->draft_post_id );
$response = preview_link_in_rest_response( $response, get_post( $this->draft_post_id ) );
$this->assertTrue($response);
$this->assertSame( 'http://moo/?p=' . $this->draft_post_id . '&preview=true&previewPathname=' . rawurlencode( wp_make_link_relative( get_permalink( $this->draft_post_id ) ) ) . '&typeName=Post', $response->data['link'] );
}

/**
* Tests get_preview_post_link() returns rewritten value.
*/
Expand Down

0 comments on commit d6fbf56

Please sign in to comment.