General: Fix existing coding standard violations in bookmark tests, as outlined in [44546].

See #43977.


git-svn-id: https://develop.svn.wordpress.org/trunk@44547 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Felix Arntz 2019-01-10 21:16:49 +00:00
parent 08564b5a80
commit 6cc9452def

View File

@ -93,8 +93,9 @@ class Tests_Bookmark_GetBookmarks extends WP_UnitTestCase {
'exclude' => ',,',
)
);
$found_ids = array();
foreach( $found as $bookmark ) {
foreach ( $found as $bookmark ) {
$found_ids[] = $bookmark->link_id;
}
@ -110,8 +111,9 @@ class Tests_Bookmark_GetBookmarks extends WP_UnitTestCase {
'include' => ',,',
)
);
$found_ids = array();
foreach( $found as $bookmark ) {
foreach ( $found as $bookmark ) {
$found_ids[] = $bookmark->link_id;
}
@ -121,9 +123,13 @@ class Tests_Bookmark_GetBookmarks extends WP_UnitTestCase {
public function test_category_param_propelry_gets_parsed_as_list() {
$bookmarks = self::factory()->bookmark->create_many( 3 );
$categories = self::factory()->term->create_many( 3, array(
$categories = self::factory()->term->create_many(
3,
array(
'taxonomy' => 'link_category',
) );
)
);
$add = wp_add_object_terms( $bookmarks[0], $categories[0], 'link_category' );
$add = wp_add_object_terms( $bookmarks[1], $categories[1], 'link_category' );
$add = wp_add_object_terms( $bookmarks[2], $categories[2], 'link_category' );
@ -133,8 +139,9 @@ class Tests_Bookmark_GetBookmarks extends WP_UnitTestCase {
'category' => ',,',
)
);
$found_ids = array();
foreach( $found as $bookmark ) {
foreach ( $found as $bookmark ) {
$found_ids[] = $bookmark->link_id;
}