Ticket #35566: 35566.tests.diff
File 35566.tests.diff, 2.1 KB (added by , 8 years ago) |
---|
-
tests/phpunit/tests/post.php
939 939 'link' => 'edit' 940 940 ) ); 941 941 942 preg_match_all( "|href='([^']+)'|", $wp_tag_cloud, $matches );942 preg_match_all( '|href="([^"]+)"|', $wp_tag_cloud, $matches ); 943 943 $this->assertSame( 1, count( $matches[1] ) ); 944 944 945 945 $terms = get_terms( $tax ); -
tests/phpunit/tests/term/wpGenerateTagCloud.php
119 119 'format' => 'list', 120 120 ) ); 121 121 122 $this->assertRegExp( "|^<ul class='wp-tag-cloud' >|", $found );122 $this->assertRegExp( "|^<ul class='wp-tag-cloud' role='list'>|", $found ); 123 123 $this->assertRegExp( "|</ul>\n|", $found ); 124 124 $this->assertContains( '>' . $tags[0]->name . '<', $found ); 125 125 } … … 164 164 'format' => 'list', 165 165 ) ); 166 166 167 $this->assertRegExp( "|^<ul class='wp-tag-cloud' >|", $found );167 $this->assertRegExp( "|^<ul class='wp-tag-cloud' role='list'>|", $found ); 168 168 $this->assertRegExp( "|</ul>\n|", $found ); 169 169 170 170 foreach ( $tags as $tag ) { … … 198 198 ), 199 199 ) ); 200 200 201 $this->assertContains( "title='Term has 1 post'", $actual[0] );202 $this->assertContains( "title='Term has 2 posts'", $actual[1] );201 $this->assertContains( 'aria-label="' . $term_objects[0]->name . ' (Term has 1 post)"', $actual[0] ); 202 $this->assertContains( 'aria-label="' . $term_objects[1]->name . ' (Term has 2 posts)"', $actual[1] ); 203 203 } 204 204 205 205 public function test_topic_count_text_callback() { … … 223 223 'topic_count_text_callback' => array( $this, 'topic_count_text_callback' ), 224 224 ) ); 225 225 226 $this->assertContains( "title='1 foo'", $actual[0] );227 $this->assertContains( "title='2 foo'", $actual[1] );226 $this->assertContains( 'aria-label="' . $term_objects[0]->name . ' (1 foo)"', $actual[0] ); 227 $this->assertContains( 'aria-label="' . $term_objects[1]->name . ' (2 foo)"', $actual[1] ); 228 228 } 229 229 230 230 /**