diff --git a/tests/phpunit/tests/post.php b/tests/phpunit/tests/post.php index 6345438039..f98786e2f3 100644 --- a/tests/phpunit/tests/post.php +++ b/tests/phpunit/tests/post.php @@ -984,23 +984,16 @@ class Tests_Post extends WP_UnitTestCase { 'link' => 'edit' ) ); + preg_match_all( "|href='([^']+)'|", $wp_tag_cloud, $matches ); + $this->assertSame( 1, count( $matches[1] ) ); + $terms = get_terms( $tax ); $term = reset( $terms ); - $url = sprintf( '%s?action=edit&taxonomy=%s&tag_ID=%d&post_type=%s', - admin_url( 'edit-tags.php' ), - $tax, - $term->term_id, - $post_type - ); - $expected_wp_tag_cloud = sprintf( "%s", - $url, - $term->term_id, - $term->name - ); - $this->assertEquals( $expected_wp_tag_cloud, $wp_tag_cloud ); - _unregister_post_type( $post_type ); - _unregister_taxonomy( $tax ); + foreach ( $matches[1] as $url ) { + $this->assertContains( 'tag_ID=' . $term->term_id, $url ); + $this->assertContains( 'post_type=new_post_type', $url ); + } } /**