File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -258,7 +258,7 @@ public function hasErrors($field_name)
258258 */
259259 public function getFieldErrors (string $ field_name )
260260 {
261- if (!$ this ->hasError ($ field_name )) {
261+ if (!$ this ->hasErrors ($ field_name )) {
262262 return new ErrorList ();
263263 }
264264
@@ -271,7 +271,7 @@ public function getFieldErrors(string $field_name)
271271 */
272272 public function getNonFieldErrors ()
273273 {
274- if (!$ this ->hasError ($ this ::NON_FIELD_ERRORS )) {
274+ if (!$ this ->hasErrors ($ this ::NON_FIELD_ERRORS )) {
275275 return new ErrorList ();
276276 }
277277
Original file line number Diff line number Diff line change @@ -59,6 +59,13 @@ public function testGetErrors()
5959 $ this ->assertInstanceOf (ErrorList::class, $ bound ->errors );
6060 }
6161
62+ public function testHasErrors ()
63+ {
64+ $ form = $ this ->getMockForAbstractClass (Form::class);
65+ $ bound = new BoundField ($ form , $ this ->simple_field , "name " );
66+ $ this ->assertFalse ($ bound ->has_errors );
67+ }
68+
6269 public function testSimpleGet ()
6370 {
6471 $ form = $ this ->getMockForAbstractClass (Form::class);
You can’t perform that action at this time.
0 commit comments