Skip to content

Commit

Permalink
align arrows and equals
Browse files Browse the repository at this point in the history
  • Loading branch information
mreishus committed Sep 27, 2024
1 parent c0537ee commit 4f54092
Showing 1 changed file with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ public function tear_down() {
}

public function test_register_block_type_from_metadata_with_registry() {
$plugin_path = WP_PLUGIN_DIR . '/test-plugin';
$plugin_path = WP_PLUGIN_DIR . '/test-plugin';
$block_json_path = $plugin_path . '/blocks/test-block/block.json';

// Create a manifest file with metadata for our test block
$manifest_data = array(
'test-block' => array(
'name' => 'test-suite/test-block',
'title' => 'Custom Test Block',
'category' => 'widgets',
'icon' => 'smiley',
'name' => 'test-suite/test-block',
'title' => 'Custom Test Block',
'category' => 'widgets',
'icon' => 'smiley',
'description' => 'A test block registered via WP_Block_Metadata_Registry',
'supports' => array( 'html' => false ),
'textdomain' => 'test-plugin',
'supports' => array( 'html' => false ),
'textdomain' => 'test-plugin',
),
);
file_put_contents( $this->temp_manifest_file, '<?php return ' . var_export( $manifest_data, true ) . ';' );
Expand All @@ -53,18 +53,18 @@ public function test_register_block_type_from_metadata_with_registry() {
}

public function test_register_block_type_from_metadata_with_registry_and_override() {
$plugin_path = WP_PLUGIN_DIR . '/test-plugin-2';
$plugin_path = WP_PLUGIN_DIR . '/test-plugin-2';
$block_json_path = $plugin_path . '/blocks/test-block/block.json';

// Create a manifest file with metadata for our test block
$manifest_data = array(
'test-block' => array(
'name' => 'test-suite/test-block',
'title' => 'Custom Test Block',
'category' => 'widgets',
'icon' => 'smiley',
'name' => 'test-suite/test-block',
'title' => 'Custom Test Block',
'category' => 'widgets',
'icon' => 'smiley',
'description' => 'A test block registered via WP_Block_Metadata_Registry',
'supports' => array( 'html' => false ),
'supports' => array( 'html' => false ),
),
);
file_put_contents( $this->temp_manifest_file, '<?php return ' . var_export( $manifest_data, true ) . ';' );
Expand All @@ -76,7 +76,7 @@ public function test_register_block_type_from_metadata_with_registry_and_overrid
$registered_block = register_block_type_from_metadata(
$block_json_path,
array(
'title' => 'Overridden Title',
'title' => 'Overridden Title',
'supports' => array( 'html' => true ),
)
);
Expand All @@ -92,7 +92,7 @@ public function test_register_block_type_from_metadata_with_registry_and_overrid
}

private function unregister_test_blocks() {
$registry = WP_Block_Type_Registry::get_instance();
$registry = WP_Block_Type_Registry::get_instance();
$block_name = 'test-suite/test-block';

if ( $registry->is_registered( $block_name ) ) {
Expand Down

0 comments on commit 4f54092

Please sign in to comment.