-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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 #5231
Closed
jasverix
wants to merge
1
commit into
sebastianbergmann:main
from
jasverix:feature/object-has-property
Closed
assertObjectHasProperty() and assertObjectNotHasProperty() #5229 #5231
jasverix
wants to merge
1
commit into
sebastianbergmann:main
from
jasverix:feature/object-has-property
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Yeah, I havent used GitHub that much, so I managed to kill the old PR when squashing. But here is a squashed PR with passing CI's. |
Codecov Report
@@ Coverage Diff @@
## main #5231 +/- ##
============================================
+ 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
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
jasverix
commented
Feb 23, 2023
sebastianbergmann
added
feature/assertion
Issues related to assertions and expectations
type/enhancement
A new idea that should be implemented
labels
Feb 23, 2023
Merged manually, thanks. |
11 tasks
jrfnl
added a commit
to jrfnl/phpunit
that referenced
this pull request
Apr 1, 2023
…ute() ... now PHPUnit 10.1.0 introduces the `assertObjectHasProperty()` and `assertObjectNotHasProperty()` methods. Refs: * sebastianbergmann#5231 * sebastianbergmann@f18856c
jrfnl
added a commit
to Yoast/PHPUnit-Polyfills
that referenced
this pull request
Apr 16, 2023
…tObject[Not]HasProperty() methods PHPUnit 10.1.0 introduces the new `Assert::assertObjectHasProperty()` and `Assert::assertObjectNotHasProperty()` methods. This commit: * Adds two traits with the same name. One to polyfill the methods when not available in PHPUnit. The other - an empty trait - to allow for `use`-ing the trait in PHPUnit versions in which the methods are already natively available. * Logic to the custom autoloader which will load the correct trait depending on the PHPUnit version used. * An availability test and functional tests for the functionality polyfilled. Includes: * Adding the new polyfill to the existing `TestCases` classes. Refs: * sebastianbergmann/phpunit#5220 * sebastianbergmann/phpunit#5231 (and follow up commits/PRs) Co-authored-by: Jan-Sverre Riksfjord <[email protected]> Co-authored-by: Sebastian Bergmann <[email protected]>
jrfnl
added a commit
to Yoast/PHPUnit-Polyfills
that referenced
this pull request
Aug 19, 2023
…ertObject[Not]HasProperty() methods PHPUnit 10.1.0 introduced the new `Assert::assertObjectHasProperty()` and `Assert::assertObjectNotHasProperty()` methods. These methods have now been backported to PHPUnit 9.6.11, so should be made available in the PHPUnit Polyfills 1.x series. This commit: * Adds two traits with the same name. One to polyfill the methods when not available in PHPUnit. The other - an empty trait - to allow for `use`-ing the trait in PHPUnit versions in which the methods are already natively available. * Logic to the custom autoloader which will load the correct trait depending on the PHPUnit version used. * An availability test and functional tests for the functionality polyfilled. Includes: * Adding the new polyfill to the existing `TestCases` classes. Refs: * sebastianbergmann/phpunit#5220 * sebastianbergmann/phpunit#5231 (and follow up commits/PRs) * sebastianbergmann/phpunit#5478 Co-authored-by: Jan-Sverre Riksfjord <[email protected]> Co-authored-by: Sebastian Bergmann <[email protected]>
jrfnl
added a commit
to Yoast/PHPUnit-Polyfills
that referenced
this pull request
Aug 19, 2023
…ertObject[Not]HasProperty() methods PHPUnit 10.1.0 introduced the new `Assert::assertObjectHasProperty()` and `Assert::assertObjectNotHasProperty()` methods. These methods have now been backported to PHPUnit 9.6.11, so should be made available in the PHPUnit Polyfills 1.x series. This commit: * Adds two traits with the same name. One to polyfill the methods when not available in PHPUnit. The other - an empty trait - to allow for `use`-ing the trait in PHPUnit versions in which the methods are already natively available. * Logic to the custom autoloader which will load the correct trait depending on the PHPUnit version used. * An availability test and functional tests for the functionality polyfilled. Includes: * Adding the new polyfill to the existing `TestCases` classes. Refs: * sebastianbergmann/phpunit#5220 * sebastianbergmann/phpunit#5231 (and follow up commits/PRs) * sebastianbergmann/phpunit#5478 Co-authored-by: Jan-Sverre Riksfjord <[email protected]> Co-authored-by: Sebastian Bergmann <[email protected]>
jrfnl
added a commit
to Yoast/PHPUnit-Polyfills
that referenced
this pull request
Aug 19, 2023
…ertObject[Not]HasProperty() methods PHPUnit 10.1.0 introduced the new `Assert::assertObjectHasProperty()` and `Assert::assertObjectNotHasProperty()` methods. These methods have now been backported to PHPUnit 9.6.11, so should be made available in the PHPUnit Polyfills 1.x series. This commit: * Adds two traits with the same name. One to polyfill the methods when not available in PHPUnit. The other - an empty trait - to allow for `use`-ing the trait in PHPUnit versions in which the methods are already natively available. * Logic to the custom autoloader which will load the correct trait depending on the PHPUnit version used. * An availability test and functional tests for the functionality polyfilled. Includes: * Adding the new polyfill to the existing `TestCases` classes. Refs: * sebastianbergmann/phpunit#5220 * sebastianbergmann/phpunit#5231 (and follow up commits/PRs) * sebastianbergmann/phpunit#5478 Co-authored-by: Jan-Sverre Riksfjord <[email protected]> Co-authored-by: Sebastian Bergmann <[email protected]>
jrfnl
added a commit
to Yoast/PHPUnit-Polyfills
that referenced
this pull request
Aug 19, 2023
…ertObject[Not]HasProperty() methods PHPUnit 10.1.0 introduced the new `Assert::assertObjectHasProperty()` and `Assert::assertObjectNotHasProperty()` methods. These methods have now been backported to PHPUnit 9.6.11, so should be made available in the PHPUnit Polyfills 1.x series. This commit: * Adds two traits with the same name. One to polyfill the methods when not available in PHPUnit. The other - an empty trait - to allow for `use`-ing the trait in PHPUnit versions in which the methods are already natively available. * Logic to the custom autoloader which will load the correct trait depending on the PHPUnit version used. * An availability test and functional tests for the functionality polyfilled. Includes: * Adding the new polyfill to the existing `TestCases` classes. Refs: * sebastianbergmann/phpunit#5220 * sebastianbergmann/phpunit#5231 (and follow up commits/PRs) * sebastianbergmann/phpunit#5478 Co-authored-by: Jan-Sverre Riksfjord <[email protected]> Co-authored-by: Sebastian Bergmann <[email protected]>
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix #5220