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

PHPUnit 9.6.11 | AssertObjectProperty trait: polyfill the Assert::assertObject[Not]HasProperty() methods #135

Merged
merged 1 commit into from
Aug 19, 2023

Commits on Aug 19, 2023

  1. PHPUnit 9.6.11 | AssertObjectProperty trait: polyfill the Assert::ass…

    …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]>
    3 people committed Aug 19, 2023
    Configuration menu
    Copy the full SHA
    2810188 View commit details
    Browse the repository at this point in the history