Skip to content

Commit

Permalink
Fix failing comment form tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
hellofromtonya authored Dec 13, 2021
1 parent 16d6c97 commit 1272182
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/phpunit/tests/comment/commentForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ public function test_default_markup_for_submit_button_and_wrapper() {

$form = get_echo( 'comment_form', array( $args, $p ) );

$button = '<input name="foo-name" type="submit" id="foo-id" class="foo-class" value="foo-label" />';
$button = '<input name="foo-name" type="submit" id="foo-id" class="foo-class wp-block-button__link" value="foo-label" />';
$hidden = get_comment_id_fields( $p );
$this->assertMatchesRegularExpression( '|<p class="form\-submit">\s*' . $button . '\s*' . $hidden . '\s*|', $form );
$this->assertMatchesRegularExpression( '|<p class="form\-submit wp\-block\-button">\s*' . $button . '\s*' . $hidden . '\s*|', $form );
}

public function test_custom_submit_button() {
Expand Down Expand Up @@ -58,7 +58,7 @@ public function test_custom_submit_field() {

$form = get_echo( 'comment_form', array( $args, $p ) );

$button = '<input name="foo-name" type="submit" id="foo-id" class="foo-class" value="foo-label" />';
$button = '<input name="foo-name" type="submit" id="foo-id" class="foo-class wp-block-button__link" value="foo-label" />';
$hidden = get_comment_id_fields( $p );
$this->assertMatchesRegularExpression( '|<p class="my\-custom\-submit\-field">\s*' . $button . '\s*' . $hidden . '\s*|', $form );
}
Expand Down

0 comments on commit 1272182

Please sign in to comment.