Skip to content

Commit

Permalink
Update test.
Browse files Browse the repository at this point in the history
  • Loading branch information
thijsoo committed Sep 19, 2024
1 parent ff1606b commit 8f4e69c
Showing 1 changed file with 21 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use Yoast\WP\SEO\Conditionals\New_Dashboard_Ui_Conditional;
use Yoast\WP\SEO\Dashboard\User_Interface\New_Dashboard_Page_Integration;
use Yoast\WP\SEO\Helpers\Current_Page_Helper;
use Yoast\WP\SEO\Helpers\Notification_Helper;
use Yoast\WP\SEO\Helpers\Product_Helper;
use Yoast\WP\SEO\Helpers\Short_Link_Helper;
use Yoast\WP\SEO\Integrations\Academy_Integration;
Expand Down Expand Up @@ -51,6 +52,13 @@ final class New_Dashboard_Page_Integration_Test extends TestCase {
*/
private $shortlink_helper;

/**
* Holds the Notification_Helper.
*
* @var Notification_Helper
*/
private $notifications_helper;

/**
* The class under test.
*
Expand All @@ -70,12 +78,14 @@ public function set_up() {
$this->current_page_helper = Mockery::mock( Current_Page_Helper::class );

Check failure on line 78 in tests/Unit/Dashboard/User_Interface/New_Dashboard_Page_Integration_Test.php

View workflow job for this annotation

GitHub Actions / Check code style

Equals sign not aligned with surrounding assignments; expected 2 spaces but found 1 space

Check failure on line 78 in tests/Unit/Dashboard/User_Interface/New_Dashboard_Page_Integration_Test.php

View workflow job for this annotation

GitHub Actions / Check code style

Equals sign not aligned with surrounding assignments; expected 2 spaces but found 1 space
$this->product_helper = Mockery::mock( Product_Helper::class );

Check failure on line 79 in tests/Unit/Dashboard/User_Interface/New_Dashboard_Page_Integration_Test.php

View workflow job for this annotation

GitHub Actions / Check code style

Equals sign not aligned with surrounding assignments; expected 7 spaces but found 6 spaces

Check failure on line 79 in tests/Unit/Dashboard/User_Interface/New_Dashboard_Page_Integration_Test.php

View workflow job for this annotation

GitHub Actions / Check code style

Equals sign not aligned with surrounding assignments; expected 7 spaces but found 6 spaces
$this->shortlink_helper = Mockery::mock( Short_Link_Helper::class );

Check failure on line 80 in tests/Unit/Dashboard/User_Interface/New_Dashboard_Page_Integration_Test.php

View workflow job for this annotation

GitHub Actions / Check code style

Equals sign not aligned with surrounding assignments; expected 5 spaces but found 4 spaces

Check failure on line 80 in tests/Unit/Dashboard/User_Interface/New_Dashboard_Page_Integration_Test.php

View workflow job for this annotation

GitHub Actions / Check code style

Equals sign not aligned with surrounding assignments; expected 5 spaces but found 4 spaces
$this->notifications_helper = Mockery::mock( Notification_Helper::class );

Check failure on line 81 in tests/Unit/Dashboard/User_Interface/New_Dashboard_Page_Integration_Test.php

View workflow job for this annotation

GitHub Actions / Check code style

Equals sign not aligned with surrounding assignments; expected 1 space but found 4 spaces

Check failure on line 81 in tests/Unit/Dashboard/User_Interface/New_Dashboard_Page_Integration_Test.php

View workflow job for this annotation

GitHub Actions / Check code style

Equals sign not aligned with surrounding assignments; expected 1 space but found 4 spaces

$this->instance = new New_Dashboard_Page_Integration(
$this->asset_manager,
$this->current_page_helper,
$this->product_helper,
$this->shortlink_helper
$this->shortlink_helper,
$this->notifications_helper
);
}

Expand Down Expand Up @@ -272,6 +282,16 @@ public function expect_get_script_data() {
->once()
->andReturn( $link_params );

$this->notifications_helper
->expects( 'get_problems' )
->once()
->andReturn( [] );

$this->notifications_helper
->expects( 'get_notifications' )
->once()
->andReturn( [] );

return $link_params;
}
}

0 comments on commit 8f4e69c

Please sign in to comment.