Skip to content

Commit

Permalink
Simplify implementation of configure method, and rectify incorrect te…
Browse files Browse the repository at this point in the history
…st name for the is_loaded function
  • Loading branch information
ingeniumed committed Oct 5, 2023
1 parent 280f1c3 commit 3f48fce
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 15 deletions.
5 changes: 0 additions & 5 deletions integrations/block-data-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,4 @@ public function load(): void {
}
} );
}

/**
* Configure `Block Data API` for VIP Platform.
*/
public function configure(): void {}
}
8 changes: 5 additions & 3 deletions integrations/integration.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}
}
5 changes: 0 additions & 5 deletions integrations/vip-governance.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,4 @@ public function load(): void {
}
} );
}

/**
* Configure `VIP Governance` for VIP Platform.
*/
public function configure(): void {}
}
2 changes: 1 addition & 1 deletion tests/integrations/test-vip-block-data-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -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() );
Expand Down
2 changes: 1 addition & 1 deletion tests/integrations/test-vip-governance.php
Original file line number Diff line number Diff line change
Expand Up @@ -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() );
Expand Down

0 comments on commit 3f48fce

Please sign in to comment.