Skip to content

Commit

Permalink
Add in a test to see if the isloaded method works correctly for both …
Browse files Browse the repository at this point in the history
…the integrations
  • Loading branch information
ingeniumed committed Sep 29, 2023
1 parent 03e135c commit 1ee05fd
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/integrations/test-vip-block-data-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,18 @@ 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 {
$block_data_api_integration = new BlockDataApiIntegration( $this->slug );

define( 'VIP_BLOCK_DATA_API_LOADED', true );

$this->assertTrue( $block_data_api_integration->is_loaded() );
}

public function test__if_is_loaded_gives_back_false_when_loaded(): void {
$block_data_api_integration = new BlockDataApiIntegration( $this->slug );

$this->assertFalse( $block_data_api_integration->is_loaded() );
}
}
14 changes: 14 additions & 0 deletions tests/integrations/test-vip-governance.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,18 @@ 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 {
$vip_governance_integration = new VipGovernanceIntegration( $this->slug );

define( 'VIP_GOVERNANCE_LOADED', true );

$this->assertTrue( $vip_governance_integration->is_loaded() );
}

public function test__if_is_loaded_gives_back_false_when_loaded(): void {
$vip_governance_integration = new VipGovernanceIntegration( $this->slug );

$this->assertFalse( $vip_governance_integration->is_loaded() );
}
}

0 comments on commit 1ee05fd

Please sign in to comment.