Skip to content

Commit 06911fd

Browse files
committed
Tidy tests
1 parent 193b5da commit 06911fd

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

tests/phpunit/tests/post/getPostClass.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,9 @@ public function test_taxonomy_classes_hit_cache() {
139139
/**
140140
* @ticket 64247
141141
*/
142-
public function test_class_list_is_list() {
142+
public function test_list_return_value_when_duplicate_classes() {
143143

144-
// Filter 'post_class' to add a duplicate, which should be removed by `array_unique()`, causing a non-indexed array.
144+
// Filter 'post_class' to add a duplicate which should be removed by `array_unique()`.
145145
add_filter(
146146
'post_class',
147147
function ( $classes ) {
@@ -153,7 +153,6 @@ function ( $classes ) {
153153
);
154154

155155
$class_list = get_post_class( 'original', $this->post_id );
156-
157156
$this->assertTrue( array_is_list( $class_list ), 'Expected get_post_class() to return list.' );
158157
$this->assertContains( 'duplicate-class', $class_list );
159158
$this->assertContains( 'original', $class_list );

tests/phpunit/tests/rest-api/rest-posts-controller.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2785,7 +2785,7 @@ public function test_prepare_item_override_excerpt_length() {
27852785
public function test_class_list_is_list() {
27862786
$post_id = self::factory()->post->create();
27872787

2788-
// Filter 'post_class' to add a duplicate, which should be removed by `array_unique()`, causing a non-indexed array.
2788+
// Filter 'post_class' to add a duplicate which should be removed by `array_unique()`.
27892789
add_filter(
27902790
'post_class',
27912791
function ( $classes ) {

0 commit comments

Comments
 (0)