specify('', function() use ($object) { $normalized = $object->normalizeModelErrors([ 'rulesAgreement' => [ 'error.you_must_accept_rules', ], 'email' => [ 'error.email_required', ], 'username' => [ 'error.username_too_short', 'error.username_not_unique', ], ]); expect($normalized)->equals([ 'rulesAgreement' => 'error.you_must_accept_rules', 'email' => 'error.email_required', 'username' => 'error.username_too_short', ]); }); } }