Skip to content

Commit bd71b78

Browse files
committed
Fix wp tests.
1 parent 14b36b6 commit bd71b78

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

tests/WP/Dashboard/Infrastructure/Integrations/Is_Site_Kit_On_Boarded_Test.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Generator;
66
use Yoast\WP\SEO\Dashboard\Infrastructure\Analytics_4\Site_Kit_Analytics_4_Adapter;
7+
use Yoast\WP\SEO\Dashboard\Infrastructure\Analytics_4\Site_Kit_Analytics_4_Api_Call;
78
use Yoast\WP\SEO\Dashboard\Infrastructure\Configuration\Site_Kit_Consent_Repository_Interface;
89
use Yoast\WP\SEO\Dashboard\Infrastructure\Integrations\Site_Kit;
910
use Yoast\WP\SEO\Tests\Unit\Dashboard\Infrastructure\Configuration\Permanently_Dismissed_Site_Kit_Configuration_Repository_Fake;
@@ -56,7 +57,8 @@ public function set_up() {
5657

5758
$this->site_kit_consent_repository = new Site_Kit_Consent_Repository_Fake();
5859
$configuration_repository = new Permanently_Dismissed_Site_Kit_Configuration_Repository_Fake();
59-
$site_kit_analytics_4_adapter = new Site_Kit_Analytics_4_Adapter();
60+
$site_kit_analytics_4_api_call = new Site_Kit_Analytics_4_Api_Call();
61+
$site_kit_analytics_4_adapter = new Site_Kit_Analytics_4_Adapter( $site_kit_analytics_4_api_call );
6062
$this->instance = new Site_Kit( $this->site_kit_consent_repository, $configuration_repository, $site_kit_analytics_4_adapter );
6163
}
6264

tests/WP/Dashboard/Infrastructure/Integrations/Is_Site_Kit_On_Boarded_Without_Site_Kit_Test.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Yoast\WP\SEO\Tests\WP\Dashboard\Infrastructure\Integrations;
44

55
use Yoast\WP\SEO\Dashboard\Infrastructure\Analytics_4\Site_Kit_Analytics_4_Adapter;
6+
use Yoast\WP\SEO\Dashboard\Infrastructure\Analytics_4\Site_Kit_Analytics_4_Api_Call;
67
use Yoast\WP\SEO\Dashboard\Infrastructure\Integrations\Site_Kit;
78
use Yoast\WP\SEO\Tests\Unit\Dashboard\Infrastructure\Configuration\Permanently_Dismissed_Site_Kit_Configuration_Repository_Fake;
89
use Yoast\WP\SEO\Tests\Unit\Dashboard\Infrastructure\Configuration\Site_Kit_Consent_Repository_Fake;
@@ -36,10 +37,11 @@ final class Is_Site_Kit_On_Boarded_Without_Site_Kit_Test extends TestCase {
3637
public function set_up() {
3738
parent::set_up();
3839

39-
$site_kit_consent_repository = new Site_Kit_Consent_Repository_Fake();
40-
$configuration_repository = new Permanently_Dismissed_Site_Kit_Configuration_Repository_Fake();
41-
$site_kit_analytics_4_adapter = new Site_Kit_Analytics_4_Adapter();
42-
$this->instance = new Site_Kit( $site_kit_consent_repository, $configuration_repository, $site_kit_analytics_4_adapter );
40+
$site_kit_consent_repository = new Site_Kit_Consent_Repository_Fake();
41+
$configuration_repository = new Permanently_Dismissed_Site_Kit_Configuration_Repository_Fake();
42+
$site_kit_analytics_4_api_call = new Site_Kit_Analytics_4_Api_Call();
43+
$site_kit_analytics_4_adapter = new Site_Kit_Analytics_4_Adapter( $site_kit_analytics_4_api_call );
44+
$this->instance = new Site_Kit( $site_kit_consent_repository, $configuration_repository, $site_kit_analytics_4_adapter );
4345
}
4446

4547
/**

0 commit comments

Comments
 (0)