Skip to content

test: complementa cobertura do Parser.php de 61% para 96%#1326

Merged
robmachado merged 2 commits into
nfephp-org:masterfrom
gersonfs:master
Apr 13, 2026
Merged

test: complementa cobertura do Parser.php de 61% para 96%#1326
robmachado merged 2 commits into
nfephp-org:masterfrom
gersonfs:master

Conversation

@gersonfs
Copy link
Copy Markdown
Collaborator

Adiciona três fixtures TXT e novos testes que exercitam as entidades
do Parser ainda não cobertas:

  • nfe_4.00_local_v12_extras.txt: BA10/BA13, GA/GA02, I05A, I50, O11,
    R04/T04, Q10/S09, JA, K, L, LA/LA07/LA11, LB, N10, N10b, U/UA,
    W17/W23, X11/X18/X22/X25a/X25b, YB, ZA/ZB/ZC/ZC04/ZC10, ZD, ZX01.
  • nfe_4.00_local_v12_cpf_variants.txt: variantes de CPF/xNome em
    F/G/X/GA, E03a, C02a, BA14, D e Simples Nacional N10c-N10h.
  • nfe_4.00_local_v13_ibscbs.txt: B31 e grupo IBS/CBS (UB01, UB12,
    UB68, UB73, UB82A, UB84, UB112, UB116, UB120, UB131, W31, W34).

As poucas linhas restantes são inalcançáveis via TXT (chaves BB02,
UB106 e UB109 ausentes no txtstructure; buildVolEntity sem chamador;
n10aEntity esbarra em bug pré-existente no Make).

Essas linhas inalcançáveis não seria o caso de remover?

Adiciona três fixtures TXT e novos testes que exercitam as entidades
do Parser ainda não cobertas:

- nfe_4.00_local_v12_extras.txt: BA10/BA13, GA/GA02, I05A, I50, O11,
  R04/T04, Q10/S09, JA, K, L, LA/LA07/LA11, LB, N10, N10b, U/UA,
  W17/W23, X11/X18/X22/X25a/X25b, YB, ZA/ZB/ZC/ZC04/ZC10, ZD, ZX01.
- nfe_4.00_local_v12_cpf_variants.txt: variantes de CPF/xNome em
  F/G/X/GA, E03a, C02a, BA14, D e Simples Nacional N10c-N10h.
- nfe_4.00_local_v13_ibscbs.txt: B31 e grupo IBS/CBS (UB01, UB12,
  UB68, UB73, UB82A, UB84, UB112, UB116, UB120, UB131, W31, W34).

As poucas linhas restantes são inalcançáveis via TXT (chaves BB02,
UB106 e UB109 ausentes no txtstructure; buildVolEntity sem chamador;
n10aEntity esbarra em bug pré-existente no Make).
@robmachado robmachado merged commit e314daa into nfephp-org:master Apr 13, 2026
7 checks passed
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.76%. Comparing base (9e035e8) to head (83b7b56).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1326      +/-   ##
============================================
+ Coverage     91.48%   93.76%   +2.27%     
  Complexity     1677     1677              
============================================
  Files            53       53              
  Lines         11985    11985              
============================================
+ Hits          10965    11238     +273     
+ Misses         1020      747     -273     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants