-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move
WP_Mock::passthruFunction( 'sanitize_title' )
to ::setUp()
- Loading branch information
1 parent
17926a8
commit de10231
Showing
1 changed file
with
1 addition
and
4 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 |
---|---|---|
|
@@ -17,6 +17,7 @@ public function setUp(): void { | |
parent::setUp(); | ||
|
||
WP_Mock::passthruFunction( '__' ); | ||
WP_Mock::passthruFunction( 'sanitize_title' ); | ||
|
||
WP_Mock::userFunction( 'wp_json_encode' )->andReturnUsing( | ||
function ( $input ) { | ||
|
@@ -46,8 +47,6 @@ public function test_plugin_sends_boxname_to_hiive(): void { | |
$plugin->expects( 'get' )->once()->with( 'version', '0' )->andReturn( '1.2.3' ); | ||
container()->set( 'plugin', $plugin ); | ||
|
||
WP_Mock::passthruFunction( 'sanitize_title' ); | ||
|
||
WP_Mock::userFunction( 'get_option' )->once()->with( 'newfold_cache_level', 2 )->andReturn( 2 ); | ||
WP_Mock::userFunction( 'get_option' )->once()->with( 'newfold_cloudflare_enabled', false )->andReturn( false ); | ||
WP_Mock::userFunction( 'get_option' )->once()->with( 'admin_email' )->andReturn( '[email protected]' ); | ||
|
@@ -77,8 +76,6 @@ public function test_plugin_sends_server_path_to_hiive(): void { | |
$plugin->expects( 'get' )->once()->with( 'version', '0' )->andReturn( '1.2.3' ); | ||
container()->set( 'plugin', $plugin ); | ||
|
||
WP_Mock::passthruFunction( 'sanitize_title' ); | ||
|
||
WP_Mock::userFunction( 'get_option' )->once()->with( 'newfold_cache_level', 2 )->andReturn( 2 ); | ||
WP_Mock::userFunction( 'get_option' )->once()->with( 'newfold_cloudflare_enabled', false )->andReturn( false ); | ||
WP_Mock::userFunction( 'get_option' )->once()->with( 'admin_email' )->andReturn( '[email protected]' ); | ||
|