id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc,focuses 50860,Fix duplicate array keys in Tests_Kses::test_wp_filter_post_kses_address method,ediamin,SergeyBiryukov,"This is the current code {{{ function test_wp_filter_post_kses_address() { global $allowedposttags; $attributes = array( 'class' => 'classname', 'id' => 'id', 'style' => 'color: red;', 'style' => 'color: red', 'style' => 'color: red; text-align:center', 'style' => 'color: red; text-align:center;', 'title' => 'title', ); foreach ( $attributes as $name => $value ) { $string = ""
1 WordPress Avenue, The Internet.
""; $expect_string = ""
1 WordPress Avenue, The Internet.
""; $this->assertEquals( $expect_string, wp_kses( $string, $allowedposttags ) ); } } }}} Here you can see the `$attributes` array contains four duplicate style keys. So in practive, we are only testing for the last value of style that is `color: red; text-align:center;`. This patch tries to fix this problem by separating test assertions for styles.",defect (bug),closed,normal,5.6,Build/Test Tools,,normal,fixed,has-patch,,