-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix failing tests after the hotfix (#918)
- Loading branch information
1 parent
9b2e5f5
commit 9c12b1a
Showing
2 changed files
with
2 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,8 +57,6 @@ public function testShouldReturnFromCachedUserDataIfAvailable() { | |
]; | ||
|
||
Functions\when( 'get_transient' )->justReturn( $userData ); | ||
Functions\expect( 'get_imagify_user' )->never(); | ||
Functions\when( 'set_transient')->justReturn(); | ||
|
||
$this->assertSame( '[email protected]', ( new User() )->email ); | ||
} | ||
|
@@ -69,9 +67,7 @@ public function testShouldReturnFromCachedUserDataIfAvailable() { | |
public function testShouldReturnErrorWhenCouldNotFetchUserData() { | ||
$wp_error = new WP_Error( 'error_id', 'Error Message' ); | ||
|
||
Functions\when( 'get_transient' )->justReturn( false ); | ||
Functions\when( 'get_imagify_user' )->justReturn( $wp_error ); | ||
Functions\when( 'set_transient')->justReturn(); | ||
Functions\when( 'get_transient' )->justReturn( $wp_error ); | ||
|
||
$this->assertSame( $wp_error, ( new User() )->get_error() ); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters