Skip to content

Conversation

@AdamPDotty
Copy link

For better error messages and lookup capability the names of data providers are kept. First in the existing data set structure then in InvalidDataProviderException if thrown and in the TestCase itself.
When you have multiple data providers for a test function it is really helpful to know which one is invalid, and you do not always start off with named sets.
Because this PR is about error messages a lot of own tests are affected.

@sebastianbergmann sebastianbergmann added type/enhancement A new idea that should be implemented feature/data-provider Data Providers labels Oct 15, 2024
@codecov
Copy link

codecov bot commented Oct 15, 2024

Codecov Report

Attention: Patch coverage is 95.77465% with 3 lines in your changes missing coverage. Please review.

Project coverage is 94.66%. Comparing base (a82cc05) to head (2cf1ce3).

Files with missing lines Patch % Lines
src/Framework/TestCase.php 60.00% 2 Missing ⚠️
src/Metadata/Api/DataProvider.php 97.95% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #5992      +/-   ##
============================================
- Coverage     94.67%   94.66%   -0.02%     
- Complexity     6406     6415       +9     
============================================
  Files           694      694              
  Lines         19189    19200      +11     
============================================
+ Hits          18167    18175       +8     
- Misses         1022     1025       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

cover function TestCase::getProviderName()
# Conflicts:
#	src/Metadata/Api/DataProvider.php
#	tests/unit/Metadata/Api/DataProviderTest.php
@sebastianbergmann
Copy link
Owner

@staabm You might be interested in this.

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

Labels

feature/data-provider Data Providers type/enhancement A new idea that should be implemented

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants