Test code updated, with thanks to @ObliviousHarmony

This commit is contained in:
Mike Dent 2020-07-20 15:45:13 +01:00
parent 53d9085c16
commit 541f68363e
2 changed files with 5 additions and 2 deletions

View File

@ -184,8 +184,11 @@ class WC_Tests_Template_Functions extends WC_Unit_Test_Case {
array(
'type' => 'hidden',
'id' => 'test_field',
'input_class' => array( 'test-field' ),
'custom_attributes' => array( 'data-total' => '10' ),
'return' => true
), 'test value');
$expected_html = '<input type="hidden" class="input-hidden" name="test" id="test_field" value="test value" />';
$expected_html = '<p class="form-row " id="test_field_field" data-priority=""><span class="woocommerce-input-wrapper"><input type="hidden" class="input-hidden test-field" name="test" id="test_field" value="test value" data-total="10" /></span></p>';
$this->assertEquals( $expected_html, $actual_html );