Skip to content

Añadir tests unitarios para StatisticsService - #31

Merged
enlike21 merged 1 commit into
enlike21:mainfrom
Aaqibhafeezkhan:test/statistics-service-unit-tests
Oct 24, 2026
Merged

enlike21 merged 1 commit into
enlike21:mainfrom
Aaqibhafeezkhan:test/statistics-service-unit-tests

Conversation

@Aaqibhafeezkhan

Copy link
Copy Markdown
Contributor

Resumen

  • Añade pruebas unitarias para getGeneralStats(), verificando los totales devueltos por los repositorios.
  • Comprueba que las llamadas posteriores reutilizan la caché y que invalidateGeneralStats() fuerza una nueva consulta.
  • Verifica que getUserStats() devuelve un array vacío cuando el usuario no tiene ascensos completados.

Pruebas

  • Repositorios simulados con PHPUnit.
  • Caché en memoria mediante Symfony\Component\Cache\Adapter\ArrayAdapter.

Closes #12

@enlike21 enlike21 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

¡Muchas gracias, @Aaqibhafeezkhan! Tests claros y cubren justo lo que pedía el issue. Lo fusiono en cuanto pase la CI 🙌

@enlike21
enlike21 merged commit da44855 into enlike21:main Oct 24, 2026
2 checks passed
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.

Tests unitarios para StatisticsService

2 participants