Skip to content

Commit

Permalink
Merge pull request #21 from penske-media-corp/bugfix/fix-phpunit-obje…
Browse files Browse the repository at this point in the history
…ct-deprecations

Update AJAX object checking to not use assertObjectHasAttribute()
  • Loading branch information
JordanPak authored Feb 7, 2023
2 parents 5850029 + 8021522 commit 753d160
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/classes/base-ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ protected function do_ajax( $ajax_handle, $message = false, $validate = true ) {

if ( $validate ) {
$this->assertIsObject( $response, $message );
$this->assertObjectHasAttribute( 'success', $response, $message );
$this->assertTrue(
property_exists( $response, 'success' ),
$message
);
}

return $response;
Expand Down

0 comments on commit 753d160

Please sign in to comment.