Skip to content

test: improve unit tests coverage for AccountService (Infection) - #8142

Open
diogopaz wants to merge 1 commit into
LibreSign:mainfrom
diogopaz:test/improve-account-service-infection-tests
Open

test: improve unit tests coverage for AccountService (Infection)#8142
diogopaz wants to merge 1 commit into
LibreSign:mainfrom
diogopaz:test/improve-account-service-infection-tests

Conversation

@diogopaz

@diogopaz diogopaz commented Aug 30, 2026

Copy link
Copy Markdown

Part of #8053

📝 Summary

This PR adds extensive PHPUnit test coverage to AccountServiceTest to eliminate escaped mutants and improve the mutation testing score with Infection, as part of #8053.

🧪 How to test

Run the focused unit test suite for AccountService:

composer test:unit -- --filter AccountServiceTest

Optionally run Infection on this specific pair to verify mutant coverage:

vendor-bin/infection/vendor/bin/infection --filter=AccountService

⚙️ API / Back‑end changes

  • Unit tests added to cover validateCreateToSign, getFileByUuid, createToSign, saveVisibleElement(s), uploadPfx, updatePfxPassword, readPfxData, and config fallbacks.
  • Unit and/or integration tests added – required for backend changes

✅ Checklist

🤖 AI (if applicable)

  • The content of this PR was partially or fully generated using AI

Signed-off-by: Diogo Paz <diogoachiles@gmail.com>
@welcome

welcome Bot commented Aug 30, 2026

Copy link
Copy Markdown

Thanks for opening your first pull request in this repository! ✌️

@vitormattos

Copy link
Copy Markdown
Member

@diogopaz the problems in the unit tests aren't caused by your PR. I'll fix this in a separate PR.

But have linter issues that you need to solve:

https://github.com/LibreSign/libresign/actions/runs/33325571740/job/100018743935?pr=8142

@vitormattos

Copy link
Copy Markdown
Member

Once you fix the linter issue and push the changes, the unit tests will work fine.

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

Labels

None yet

Projects

Status: 0. Backlog

Development

Successfully merging this pull request may close these issues.

2 participants