diff --git a/integrations/block-data-api.php b/integrations/block-data-api.php index 458a78c431..e1fdae23e3 100644 --- a/integrations/block-data-api.php +++ b/integrations/block-data-api.php @@ -55,9 +55,4 @@ public function load(): void { } } ); } - - /** - * Configure `Block Data API` for VIP Platform. - */ - public function configure(): void {} } diff --git a/integrations/integration.php b/integrations/integration.php index 4316521f46..5c6e9dcdbe 100644 --- a/integrations/integration.php +++ b/integrations/integration.php @@ -170,11 +170,13 @@ abstract public function load(): void; /** * Configure the integration for VIP platform. - * + * * If we want to implement functionality only if the integration is enabled via VIP * then we will use this function. - * + * + * By default, the implementation of this function will be empty. + * * @private */ - abstract public function configure(): void; + public function configure(): void {} } diff --git a/integrations/vip-governance.php b/integrations/vip-governance.php index de9bdce570..d1bbd54a66 100644 --- a/integrations/vip-governance.php +++ b/integrations/vip-governance.php @@ -55,9 +55,4 @@ public function load(): void { } } ); } - - /** - * Configure `VIP Governance` for VIP Platform. - */ - public function configure(): void {} } diff --git a/tests/integrations/test-vip-block-data-api.php b/tests/integrations/test-vip-block-data-api.php index 5d32c50489..a417791298 100644 --- a/tests/integrations/test-vip-block-data-api.php +++ b/tests/integrations/test-vip-block-data-api.php @@ -22,7 +22,7 @@ public function test__load_call_returns_inactive_because_no_block_data_api_plugi $this->assertFalse( $block_data_api_integration->is_active() ); } - public function test__if_is_loaded_gives_back_true_when_loaded(): void { + public function test__if_is_loaded_gives_back_false_when_not_loaded(): void { $block_data_api_integration = new BlockDataApiIntegration( $this->slug ); $this->assertFalse( $block_data_api_integration->is_loaded() ); diff --git a/tests/integrations/test-vip-governance.php b/tests/integrations/test-vip-governance.php index ab1754ef63..e4669f3eed 100644 --- a/tests/integrations/test-vip-governance.php +++ b/tests/integrations/test-vip-governance.php @@ -22,7 +22,7 @@ public function test__load_call_returns_inactive_because_no_governance_plugin_lo $this->assertFalse( $vip_governance_integration->is_active() ); } - public function test__if_is_loaded_gives_back_true_when_loaded(): void { + public function test__if_is_loaded_gives_back_false_when_not_loaded(): void { $vip_governance_integration = new VipGovernanceIntegration( $this->slug ); $this->assertFalse( $vip_governance_integration->is_loaded() ); diff --git a/vip-integrations.php b/vip-integrations.php index 0767948588..9549897878 100644 --- a/vip-integrations.php +++ b/vip-integrations.php @@ -12,27 +12,21 @@ namespace Automattic\VIP\Integrations; +// @codeCoverageIgnoreStart -- the actual code here is tested individually in the unit tests. defined( 'ABSPATH' ) || die(); -// @codeCoverageIgnoreStart - the actual code here is tested individually in the unit tests. - require_once __DIR__ . '/integrations/integration.php'; require_once __DIR__ . '/integrations/integrations.php'; require_once __DIR__ . '/integrations/enums.php'; require_once __DIR__ . '/integrations/integration-vip-config.php'; require_once __DIR__ . '/integrations/block-data-api.php'; require_once __DIR__ . '/integrations/parsely.php'; +require_once __DIR__ . '/integrations/vip-governance.php'; // Register VIP integrations here. IntegrationsSingleton::instance()->register( new BlockDataApiIntegration( 'block-data-api' ) ); IntegrationsSingleton::instance()->register( new ParselyIntegration( 'parsely' ) ); - -// ToDo: Remove this after the initial deployment of the VIP Governance integration. -if ( file_exists( __DIR__ . '/integrations/vip-governance.php' ) ) { - require_once __DIR__ . '/integrations/vip-governance.php'; - IntegrationsSingleton::instance()->register( new VipGovernanceIntegration( 'vip-governance' ) ); -} - +IntegrationsSingleton::instance()->register( new VipGovernanceIntegration( 'vip-governance' ) ); // @codeCoverageIgnoreEnd /**