Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assertObjectHasProperty() and assertObjectNotHasProperty() #5229

Closed
wants to merge 7 commits into from
Closed

assertObjectHasProperty() and assertObjectNotHasProperty() #5229

wants to merge 7 commits into from

Conversation

jasverix
Copy link
Contributor

Added PR for PhpUnit 10.0. Still not sure if you accept the feature request at all, but then the PR is at least here.

If accepted, I can try to make a "small-as-possible" change for PhpUnit 9 so we can get rid of the deprecation warnings. Just add the new methods and let them call the old methods or something.

If you don't want the feature, then it is OK, but then I will probably add the code in our codebase instead, because we cannot live without them in our API tests 😅

Fix #5220

@sebastianbergmann
Copy link
Owner

Still not sure if you accept the feature request at all, but then the PR is at least here.

I am open to the idea and will review this PR as soon as I find the time.

I can try to make a "small-as-possible" change for PhpUnit 9 so we can get rid of the deprecation warnings.

PHPUnit 9 is closed for additions.

@sebastianbergmann sebastianbergmann added this to the PHPUnit 10.1 milestone Feb 20, 2023
@sebastianbergmann sebastianbergmann added type/enhancement A new idea that should be implemented feature/assertion Issues related to assertions and expectations labels Feb 20, 2023
@sebastianbergmann
Copy link
Owner

@sebastianbergmann sebastianbergmann changed the title Feature/object has property assertObjectHasProperty() and assertObjectNotHasProperty() Feb 20, 2023
@jasverix
Copy link
Contributor Author

Yeah, I actually just fetched the old classes from 9 and renamed them. Have gone through the code now and removed ClassHasProperty, and added the two new functions to Functions.php.

@sebastianbergmann
Copy link
Owner

Can you please fix the coding guidelines and type checker issues and squash your changes into a single commit when you're done? Thanks!

@codecov
Copy link

codecov bot commented Feb 21, 2023

Codecov Report

Merging #5229 (652a86f) into main (94ec320) will increase coverage by 0.02%.
The diff coverage is 94.11%.

❗ Current head 652a86f differs from pull request most recent head b43b852. Consider uploading reports for the commit b43b852 to get more accurate results

@@             Coverage Diff              @@
##               main    #5229      +/-   ##
============================================
+ Coverage     81.30%   81.33%   +0.02%     
- Complexity     5853     5863      +10     
============================================
  Files           629      630       +1     
  Lines         18544    18578      +34     
============================================
+ Hits          15078    15110      +32     
- Misses         3466     3468       +2     
Impacted Files Coverage Δ
.../Framework/Constraint/Object/ObjectHasProperty.php 90.00% <90.00%> (ø)
src/Framework/Assert.php 92.93% <100.00%> (+0.13%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@jasverix jasverix closed this Feb 21, 2023
@jasverix jasverix deleted the feature/object-has-property branch February 21, 2023 10:19
@sebastianbergmann sebastianbergmann removed this from the PHPUnit 10.1 milestone Mar 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/assertion Issues related to assertions and expectations type/enhancement A new idea that should be implemented
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add assertObjectHasProperty() and assertObjectHasNotProperty()
2 participants