Skip to content

Commit

Permalink
Update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
artemiomorales authored and michalczaplinski committed Jan 17, 2024
1 parent 294d45e commit d0ecd52
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions phpunit/experimental/WP_Block_Bindings_Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function test_register_source() {
}

/**
* Test replace_html method.
* Test replace_html method for content.
*/
public function test_replace_html_for_paragraph_content() {
$wp_block_bindings = new WP_Block_Bindings();
Expand All @@ -48,7 +48,7 @@ public function test_replace_html_for_paragraph_content() {
}

/**
* Test replace_html method.
* Test replace_html method for attributes.
*/
public function test_replace_html_for_attribute() {
$wp_block_bindings = new WP_Block_Bindings();
Expand All @@ -61,7 +61,7 @@ public function test_replace_html_for_attribute() {
$this->assertStringContainsString( $source_value, $result );
}

// Test cases for scenarios where block type is not registered, or attribute source is not 'html' or 'rich-text'.
// Test case for scenarios where block type is not registered.
public function test_replace_html_with_unregistered_block() {
$wp_block_bindings = new WP_Block_Bindings();

Expand All @@ -72,10 +72,10 @@ public function test_replace_html_with_unregistered_block() {

$result = $wp_block_bindings->replace_html( $block_content, $block_name, $block_attr, $source_value );

// Expect original content to be returned as block type is not registered.
$this->assertEquals( $block_content, $result );
}

// Test case for scenarios where block is registered but attribute does not exist on block type.
public function test_replace_html_with_registered_block_but_unsupported_source_type() {
$wp_block_bindings = new WP_Block_Bindings();

Expand All @@ -86,7 +86,6 @@ public function test_replace_html_with_registered_block_but_unsupported_source_t

$result = $wp_block_bindings->replace_html( $block_content, $block_name, $block_attr, $source_value );

// Expect original content to be returned as the source type is not supported.
$this->assertEquals( $block_content, $result );
}
}

0 comments on commit d0ecd52

Please sign in to comment.