@@ -33,20 +33,22 @@ public function test_Feedback_Field_can_be_instantiated() {
33
33
$ this ->assertEquals ( 'test_value ' , $ field ->get_value () );
34
34
$ this ->assertEquals ( 'basic ' , $ field ->get_type () );
35
35
$ this ->assertEquals ( array (), $ field ->get_meta () );
36
+ $ this ->assertNull ( $ field ->get_form_field_id () );
36
37
}
37
38
38
39
/**
39
40
* Test that the Feedback_Field class can be instantiated with additional parameters.
40
41
*/
41
42
public function test_Feedback_Field_with_additional_parameters () {
42
- $ field = new Feedback_Field ( 'test_key ' , 'test_label ' , 'test_value ' , 'text ' , array ( 'meta_key ' => 'meta_value ' ) );
43
+ $ field = new Feedback_Field ( 'test_key ' , 'test_label ' , 'test_value ' , 'text ' , array ( 'meta_key ' => 'meta_value ' ), ' firstname ' );
43
44
$ this ->assertEquals ( 'test_key ' , $ field ->get_key () );
44
45
$ this ->assertEquals ( 'test_label ' , $ field ->get_label () );
45
46
$ this ->assertEquals ( 'test_value ' , $ field ->get_value () );
46
47
$ this ->assertEquals ( 'text ' , $ field ->get_type () );
47
48
$ this ->assertEquals ( array ( 'meta_key ' => 'meta_value ' ), $ field ->get_meta () );
48
49
$ this ->assertEquals ( 'meta_value ' , $ field ->get_meta_key_value ( 'meta_key ' ) );
49
50
$ this ->assertNull ( $ field ->get_meta_key_value ( 'non_existant ' ) );
51
+ $ this ->assertEquals ( 'firstname ' , $ field ->get_form_field_id () );
50
52
}
51
53
52
54
/**
@@ -59,6 +61,7 @@ public function test_Feedback_Field_with_empty_values() {
59
61
$ this ->assertSame ( '' , $ field ->get_value () );
60
62
$ this ->assertEquals ( 'basic ' , $ field ->get_type () );
61
63
$ this ->assertEquals ( array (), $ field ->get_meta () );
64
+ $ this ->assertNull ( $ field ->get_form_field_id () );
62
65
}
63
66
64
67
/**
0 commit comments