phpunit icon indicating copy to clipboard operation
phpunit copied to clipboard

Add `JsonMatches` Assert API method

Open Pytal opened this issue 3 years ago • 4 comments

Usage

// Before
$this->interface
	->expects($this->once())
	->method('method')
	->with(new JsonMatches($jsonString));

// After
$this->interface
	->expects($this->once())
	->method('method')
	->with($this->jsonMatches($jsonString));

Pytal avatar Aug 02 '22 18:08 Pytal

@sebastianbergmann able to approve the workflow run here?

Pytal avatar Aug 04 '22 05:08 Pytal

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (855919d) 89.40% compared to head (67a4ef0) 89.34%.

:exclamation: Current head 67a4ef0 differs from pull request most recent head c3b14d5. Consider uploading reports for the commit c3b14d5 to get more accurate results

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #5028      +/-   ##
============================================
- Coverage     89.40%   89.34%   -0.07%     
- Complexity     6425     6426       +1     
============================================
  Files           683      683              
  Lines         20405    20407       +2     
============================================
- Hits          18243    18232      -11     
- Misses         2162     2175      +13     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Aug 04 '22 05:08 codecov[bot]

Test has been added, ready for another CI round @sebastianbergmann

Pytal avatar Aug 04 '22 18:08 Pytal

Review here @sebastianbergmann?

Pytal avatar Aug 09 '22 02:08 Pytal

Thank you for your contribution. I appreciate the time you invested in preparing this pull request. However, I have decided not to merge it as I am not convinced that all constraints need to have a convenience method for creating them.

sebastianbergmann avatar Jan 13 '24 14:01 sebastianbergmann