Changeset 35987
- Timestamp:
- 12/17/2015 04:55:23 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/post.php
r35817 r35987 985 985 ) ); 986 986 987 preg_match_all( "|href='([^']+)'|", $wp_tag_cloud, $matches ); 988 $this->assertSame( 1, count( $matches[1] ) ); 989 987 990 $terms = get_terms( $tax ); 988 991 $term = reset( $terms ); 989 $url = sprintf( '%s?action=edit&taxonomy=%s&tag_ID=%d&post_type=%s', 990 admin_url( 'edit-tags.php' ), 991 $tax, 992 $term->term_id, 993 $post_type 994 ); 995 $expected_wp_tag_cloud = sprintf( "<a href='%s' class='tag-link-%d' title='1 topic' style='font-size: 8pt;'>%s</a>", 996 $url, 997 $term->term_id, 998 $term->name 999 ); 1000 $this->assertEquals( $expected_wp_tag_cloud, $wp_tag_cloud ); 1001 1002 _unregister_post_type( $post_type ); 1003 _unregister_taxonomy( $tax ); 992 993 foreach ( $matches[1] as $url ) { 994 $this->assertContains( 'tag_ID=' . $term->term_id, $url ); 995 $this->assertContains( 'post_type=new_post_type', $url ); 996 } 1004 997 } 1005 998
Note: See TracChangeset
for help on using the changeset viewer.