Skip to content

Commit

Permalink
Update unit test to new situation
Browse files Browse the repository at this point in the history
  • Loading branch information
thijsoo committed Sep 9, 2024
1 parent b70dd82 commit f691313
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Mockery;
use WPSEO_Admin_Asset_Manager;
use Yoast\WP\SEO\Conditionals\Admin_Conditional;
use Yoast\WP\SEO\Conditionals\New_Dashboard_Ui_Conditional;
use Yoast\WP\SEO\Dashboard\User_Interface\General_Page_Integration;
use Yoast\WP\SEO\Helpers\Current_Page_Helper;
use Yoast\WP\SEO\Helpers\Product_Helper;
Expand Down Expand Up @@ -108,6 +109,7 @@ public function test_get_conditionals() {
$this->assertEquals(
[
Admin_Conditional::class,
New_Dashboard_Ui_Conditional::class,
],
General_Page_Integration::get_conditionals()
);
Expand All @@ -120,7 +122,7 @@ public function test_get_conditionals() {
*/
public static function register_hooks_provider() {
return [
'Not on dashboard' => [
'Not on dashboard' => [
'current_page' => 'not dashboard',
'action_times' => 0,
],
Expand Down Expand Up @@ -149,10 +151,6 @@ public function test_register_hooks_on_dashboard_page( $current_page, $action_ti
->with( 'wpseo_submenu_page', [ $this->instance, 'add_page' ] )
->once();

Monkey\Functions\expect( 'apply_filters' )
->with( 'wpseo_new_dashboard', false )
->once()->andReturnTrue();

$this->current_page_helper
->expects( 'get_current_yoast_seo_page' )
->once()
Expand Down Expand Up @@ -253,13 +251,15 @@ public function expect_get_script_data() {
];

$this->product_helper
->expects( 'is_premium' )
->once()
->andReturn( false );
->expects( 'is_premium' )
->once()
->andReturn( false );

Monkey\Functions\expect( 'is_rtl' )->once()->andReturn( false );

Monkey\Functions\expect( 'plugins_url' )->once()->andReturn( 'http://basic.wordpress.test/wp-content/worspress-seo' );
Monkey\Functions\expect( 'plugins_url' )
->once()
->andReturn( 'http://basic.wordpress.test/wp-content/worspress-seo' );

$this->shortlink_helper
->expects( 'get_query_params' )
Expand Down

0 comments on commit f691313

Please sign in to comment.