normalizeModelErrors([ 'rulesAgreement' => [ 'error.you_must_accept_rules', ], 'email' => [ 'error.email_required', ], 'username' => [ 'error.username_too_short', 'error.username_not_unique', ], ]); $this->assertEquals([ 'rulesAgreement' => 'error.you_must_accept_rules', 'email' => 'error.email_required', 'username' => 'error.username_too_short', ], $normalized); } }