Skip to content

Commit ed4a449

Browse files
committed
- only run the tests when WPGraphQL Content Blocks and ACF PRO are available
1 parent 51ca21a commit ed4a449

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/wpunit/FieldTypes/TaxonomyFieldTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,16 @@ public function get_expected_block_fragment_response() {
9595

9696
public function testQueryTaxononomyFieldOnBlock() {
9797

98+
// if ACF PRO is not active, skip the test
99+
if ( ! defined( 'ACF_PRO' ) ) {
100+
$this->markTestSkipped( 'ACF Pro is not active so this test will not run.' );
101+
}
102+
103+
// If WPGraphQL Content Blocks couldn't be activated, skip
104+
if ( ! defined( 'WPGRAPHQL_CONTENT_BLOCKS_DIR' ) ) {
105+
$this->markTestSkipped( 'This test is skipped when WPGraphQL Content Blocks is not active' );
106+
}
107+
98108
acf_register_block_type([
99109
'name' => 'block_with_category_field',
100110
'title' => 'Block with Category Field',

0 commit comments

Comments
 (0)