Skip to content

Conversation

@spawnia
Copy link
Owner

@spawnia spawnia commented Apr 3, 2025

  • Added automated tests
  • Documented for all relevant versions
  • Updated the changelog

Changes

  • Add trait Spawnia\Sailor\Testing\RequiresSailorMocks
  • Add method Spawnia\Sailor\Operation::requireMocks()

Breaking changes

None, I thought about integrating this in Spawnia\Sailor\Testing\UsesSailorMocks but saw that it broke our tests and may break some integration tests others have.

@spawnia spawnia requested a review from Copilot April 3, 2025 12:54
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a new trait, RequiresSailorMocks, along with the requireMocks() method to enforce mock usage in tests and prevent stray requests.

  • Updated README.md with new installation and testing instructions using RequiresSailorMocks
  • Refactored code examples to use named arguments and variables for improved clarity
  • Updated CHANGELOG.md to reflect the new additions

Reviewed Changes

Copilot reviewed 2 out of 9 changed files in this pull request and generated no comments.

File Description
README.md Updated installation instructions and test integration examples using the new trait and method
CHANGELOG.md Added changelog entries for the new trait and method
Files not reviewed (7)
  • src/Operation.php: Language not supported
  • src/Testing/RequiresSailorMocks.php: Language not supported
  • tests/Integration/CustomTypesTest.php: Language not supported
  • tests/Integration/InputTest.php: Language not supported
  • tests/Integration/PolymorphicTest.php: Language not supported
  • tests/Integration/SimpleTest.php: Language not supported
  • tests/Unit/Testing/RequiresSailorMocksTest.php: Language not supported

@spawnia spawnia merged commit cd4fb86 into master Apr 7, 2025
30 checks passed
@spawnia spawnia deleted the require-mocks branch April 7, 2025 08:53
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