@@ -104,7 +104,7 @@ public function testQueryTaxononomyFieldOnBlock() {
104104 if ( ! defined ( 'WPGRAPHQL_CONTENT_BLOCKS_DIR ' ) ) {
105105 $ this ->markTestSkipped ( 'This test is skipped when WPGraphQL Content Blocks is not active ' );
106106 }
107-
107+
108108 acf_register_block_type ([
109109 'name ' => 'block_with_category_field ' ,
110110 'title ' => 'Block with Category Field ' ,
@@ -255,7 +255,7 @@ interfaces {
255255 ]);
256256
257257 $ content = '
258- <!-- wp:acf/block-with-category-field {"name":"acf/block-with-category-field","data":{" ' . $ field_key . '":[" ' . $ category_id . '", " ' . $ category_2_id . '" ]},"align":"","mode":"edit"} /-->
258+ <!-- wp:acf/block-with-category-field {"name":"acf/block-with-category-field","data":{" ' . $ field_key . '":[ ' . $ category_id . ', ' . $ category_2_id . ']},"align":"","mode":"edit"} /-->
259259 ' ;
260260
261261 $ post_id = self ::factory ()->post ->create ([
@@ -282,10 +282,11 @@ interfaces {
282282 '__typename ' => 'Category ' ,
283283 'databaseId ' => $ category_id ,
284284 ], 0 ),
285- $ this ->expectedNode ( 'blockTaxonomyTest.category.nodes ' , [
286- '__typename ' => 'Category ' ,
287- 'databaseId ' => $ category_2_id ,
288- ], 0 ),
285+ // Only the first node will be returned because the taxonomy field is set to "multiple: 0" so ACF will only return a single value
286+ // $this->expectedNode( 'blockTaxonomyTest.category.nodes', [
287+ // '__typename' => 'Category',
288+ // 'databaseId' => $category_2_id,
289+ // ], 1 ),
289290 ], 0 ),
290291 ]);
291292
0 commit comments