laravel-mongodb icon indicating copy to clipboard operation
laravel-mongodb copied to clipboard

refactor: consolidate repetitive model instantiations across tests

Open zigzagdev opened this issue 5 months ago • 0 comments

Description

This pull request refactors the test suite to eliminate redundant model instantiations. Several test cases repeatedly constructed identical User, Item, and Book model objects inline, leading to code duplication and reduced maintainability.

To address this:

  • A set of factory-like helper methods has been introduced to create consistent test data.
  • All repeated inline instantiations were replaced by these shared methods.
  • This improves readability, enforces consistency, and simplifies future updates.

This is a non-functional change (refactor only) and does not alter the behaviour or scope of any existing tests.

Checklist

  • [x] Add tests and ensure they pass スクリーンショット 2025-06-24 10 38 00

zigzagdev avatar Jun 24 '25 01:06 zigzagdev