Skip to content
Permalink
Browse files

Pings/Trackbacks: Remove a failing test that won't pass as long as `W…

…P_IMPORTING` gets set during tests.

The `_publish_post_hook()` function checks for `WP_IMPORTING` before setting meta fields fir enclosures and pings, which means this test is doomed to fail.

The test can be re-implemented if the `WP_IMPORTING` constant gets moved to a function similar to how `wp_installing()` works for the `WP_INSTALLING` constant.

See #48014


git-svn-id: https://develop.svn.wordpress.org/trunk@46428 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information...
johnbillion committed Oct 7, 2019
1 parent 385983f commit f257bdfbb2a1c7640647c7106f53116557366517
Showing with 0 additions and 23 deletions.
  1. +0 −23 tests/phpunit/tests/post.php
@@ -1430,27 +1430,4 @@ public function test_insert_post_should_respect_date_floating_post_status_arg_no
$post = get_post( $post_id );
self::assertEquals( strtotime( gmdate( 'Y-m-d H:i:s' ) ), strtotime( $post->post_date_gmt ), 'The dates should be equal', 2 );
}
/**
* @ticket 48014
*/
public function test_updated_post_should_not_duplicate_enclosure_meta_fields() {
$post_id = self::factory()->post->create();
$encloseme_before = get_post_meta( $post_id, '_encloseme' );
$pingme_before = get_post_meta( $post_id, '_pingme' );
$updated = wp_update_post( get_post( $post_id ), true );
$encloseme_after = get_post_meta( $post_id, '_encloseme' );
$pingme_after = get_post_meta( $post_id, '_pingme' );
$this->assertSame( $post_id, $updated );
$this->assertCount( 1, $encloseme_before );
$this->assertCount( 1, $encloseme_after );
$this->assertCount( 1, $pingme_before );
$this->assertCount( 1, $pingme_after );
}
}

0 comments on commit f257bdf

Please sign in to comment.
You can’t perform that action at this time.