From 2a78eb6ee956146102c5d3f84c286a80db1bcb46 Mon Sep 17 00:00:00 2001 From: Theo <328805+theodesp@users.noreply.github.com> Date: Wed, 14 Aug 2024 12:38:03 +0100 Subject: [PATCH] chore: wip debug --- includes/Blocks/Block.php | 5 +++-- tests/unit/CoreVideoTest.php | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/Blocks/Block.php b/includes/Blocks/Block.php index 19d3c92c..d11b6171 100644 --- a/includes/Blocks/Block.php +++ b/includes/Blocks/Block.php @@ -103,7 +103,9 @@ private function register_block_attributes_as_fields(): void { 'fields' => $block_attribute_fields, ] ); - + if ($this->type_name === 'CoreTable') { + print_r($block_attributes); + } register_graphql_field( $this->type_name, 'attributes', @@ -427,7 +429,6 @@ private function resolve_block_attributes_recursive( $attributes, string $html, $result[ $key ] = $attributes[ $key ] ?? $default; } } - return $result; } diff --git a/tests/unit/CoreVideoTest.php b/tests/unit/CoreVideoTest.php index b96538e3..baf83805 100644 --- a/tests/unit/CoreVideoTest.php +++ b/tests/unit/CoreVideoTest.php @@ -68,7 +68,6 @@ public function test_retrieve_core_video_attributes() { } '; $actual = graphql( array( 'query' => $query ) ); - print_r(get_post( $this->post_id )); $node = $actual['data']['posts']['nodes'][0]; // Verify that the ID of the first post matches the one we just created.