File tree 1 file changed +9
-2
lines changed
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -64,14 +64,21 @@ public function test_methods_takes_a_string()
64
64
$ this ->assert_equals ('ANCIENT ART OF MAIN TANKING ' , $ a ['upper_name ' ]);
65
65
}
66
66
67
- // methods added last should we shuld have value of the method in our json
68
- // rather than the regular attribute value
67
+ // methods should take precedence over attributes
69
68
public function test_methods_method_same_as_attribute ()
70
69
{
71
70
$ a = $ this ->_a (array ('methods ' => 'name ' ));
72
71
$ this ->assert_equals ('ancient art of main tanking ' , $ a ['name ' ]);
73
72
}
74
73
74
+ public function test_methods_method_alias ()
75
+ {
76
+ $ a = $ this ->_a (array ('methods ' => array ('name ' => 'alias_name ' )));
77
+ $ this ->assert_equals ('ancient art of main tanking ' , $ a ['alias_name ' ]);
78
+ $ a = $ this ->_a (array ('methods ' => array ('upper_name ' => 'name ' )));
79
+ $ this ->assert_equals ('ANCIENT ART OF MAIN TANKING ' , $ a ['name ' ]);
80
+ }
81
+
75
82
public function test_include ()
76
83
{
77
84
$ a = $ this ->_a (array ('include ' => array ('author ' )));
You can’t perform that action at this time.
0 commit comments