Skip to content

Commit ed05eae

Browse files
added setting for redirects to be true for previous tests
1 parent 945c33e commit ed05eae

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

plugins/faustwp/tests/integration/ReplacementCallbacksTests.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ public function test_post_link_returns_filtered_link_when_content_replacement_is
166166
*/
167167
public function test_post_preview_link_returns_filtered_link() {
168168
faustwp_update_setting( 'frontend_uri', 'http://moo' );
169-
169+
faustwp_update_setting( 'enable_redirects', true );
170170
$this->assertSame( 'http://moo/?p=' . $this->post_id . '&preview=true&previewPathname=' . rawurlencode( wp_make_link_relative( get_permalink( $this->post_id ) ) ) . '&typeName=Post', get_preview_post_link( $this->post_id ) );
171171
}
172172

@@ -175,7 +175,7 @@ public function test_post_preview_link_returns_filtered_link() {
175175
*/
176176
public function test_post_preview_link_adds_preview_true_query_param() {
177177
faustwp_update_setting( 'frontend_uri', 'http://moo' );
178-
178+
faustwp_update_setting( 'enable_redirects', true );
179179
$link = post_preview_link( 'http://moo/', get_post( $this->post_id ) );
180180

181181
$this->assertSame( 'http://moo/?previewPathname=' . rawurlencode( wp_make_link_relative( get_permalink( $this->post_id ) ) ) . '&p=' . $this->post_id . '&preview=true&typeName=Post', $link );
@@ -198,7 +198,7 @@ public function test_post_preview_doesnt_rewrite_link_with_redirect_off() {
198198
* Tests post_preview_link() uses frontend_uri scheme if different than home_url scheme.
199199
*/
200200
public function test_post_preview_link_uses_frontend_uri_scheme() {
201-
201+
faustwp_update_setting( 'enable_redirects', true );
202202
faustwp_update_setting( 'frontend_uri', 'http://moo' );
203203
add_filter( 'home_url', [$this, 'get_home_url'] );
204204
$link = post_preview_link( 'http://moo/', get_post( $this->post_id ) );

0 commit comments

Comments
 (0)