Skip to content

Commit 54b48d6

Browse files
apply test feedback
1 parent b389659 commit 54b48d6

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

tests/phpunit/tests/abilities-api/wpCoreAbilities.php

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,9 @@ public function test_core_get_bloginfo_executes(): void {
8888
);
8989

9090
$this->assertIsArray( $result );
91-
$this->assertArrayHasKey( 'name', $result );
92-
$this->assertArrayHasKey( 'url', $result );
93-
$this->assertArrayNotHasKey( 'description', $result );
94-
$this->assertArrayNotHasKey( 'version', $result );
91+
$this->assertCount( 2, $result );
9592
$this->assertSame( get_bloginfo( 'name' ), $result['name'] );
9693
$this->assertSame( get_bloginfo( 'url' ), $result['url'] );
97-
98-
wp_set_current_user( 0 );
9994
}
10095

10196
/**
@@ -135,8 +130,6 @@ public function test_core_get_current_user_info_returns_user_data(): void {
135130
$this->assertSame( 'fr_FR', $result['locale'] );
136131
$this->assertSame( 'subscriber', $result['roles'][0] );
137132
$this->assertSame( get_userdata( $user_id )->display_name, $result['display_name'] );
138-
139-
wp_set_current_user( 0 );
140133
}
141134

142135
/**
@@ -158,7 +151,5 @@ public function test_core_get_environment_type_executes(): void {
158151
$this->assertArrayHasKey( 'db_server_info', $ability_data );
159152
$this->assertArrayHasKey( 'wp_version', $ability_data );
160153
$this->assertSame( $environment, $ability_data['environment'] );
161-
162-
wp_set_current_user( 0 );
163154
}
164155
}

0 commit comments

Comments
 (0)