Skip to content

Commit b4b9552

Browse files
committed
Fix test
1 parent 2afc8b4 commit b4b9552

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tests/php/features/TestProtectedContent.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -224,12 +224,12 @@ public function testAdminCategories() {
224224
}
225225

226226
/**
227-
* Check if passwords on posts are synced when feature not active
227+
* Check if password protected post is not synced when feature is disabled
228228
*
229229
* @since 4.0.0
230230
* @group protected-content
231231
*/
232-
public function testNoSyncPasswordedPost() {
232+
public function test_password_protected_post_is_not_synced_when_feature_is_disabled() {
233233
add_filter( 'ep_post_sync_args', array( $this, 'filter_post_sync_args' ), 10, 1 );
234234

235235
$post_id = $this->ep_factory->post->create( array( 'post_password' => 'test' ) );
@@ -241,8 +241,7 @@ public function testNoSyncPasswordedPost() {
241241

242242
// Check if password was synced
243243
$post = ElasticPress\Indexables::factory()->get( 'post' )->get( $post_id );
244-
245-
$this->assertArrayNotHasKey( 'post_password', $post );
244+
$this->assertEmpty( $post );
246245
}
247246

248247
/**

0 commit comments

Comments
 (0)