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

Add tests for access tree #241

Merged
merged 5 commits into from
Feb 9, 2024
Merged

Add tests for access tree #241

merged 5 commits into from
Feb 9, 2024

Conversation

arogachev
Copy link
Contributor

Q A
Is bugfix?
New feature?
Breaks BC?

@arogachev arogachev linked an issue Feb 9, 2024 that may be closed by this pull request
@arogachev arogachev self-assigned this Feb 9, 2024
@arogachev arogachev added the type:test Test label Feb 9, 2024
@arogachev arogachev added this to the 2.0 milestone Feb 9, 2024
Copy link

what-the-diff bot commented Feb 9, 2024

PR Summary

  • PHP Version Update Across Workflows:
    Multiple integral files including 'bc.yml', 'build.yml', 'composer-require-checker.yml', 'mutation.yml', 'rector.yml' and 'static.yml' in the workflows directory have seen a shift from PHP version 8.1 to version 8.3. This should enable better compatibility and leverage the improvements and features provided in the more advanced PHP version.

  • Excluded PHP Version for Windows OS:
    In the build.yml file, PHP version 8.3 was added to the list of excluded versions for the windows-latest operating system. This ensures the system will not be trying to run a version of PHP that might cause conflicts or issues with this OS.

  • Refined Error Handling in SimpleItemsStorage:
    In the important file src/SimpleItemsStorage.php, superfluous code was removed to streamline and reduce clutter. Furthermore, the method getAccessTree() has been improved to do a verification check if an item actually exists before throwing exceptions, reducing potential confusion and error throwing.

  • Improved Testing:
    The testing suite file ItemsStorageTestTrait.php in tests/Common/ has been extended with new methods and functionalities to enhance the testing. The setUp() and tearDown() methods have been modified to freeze the clock at a specific timestamp for certain tests. This ability to control time makes the tests more reliable and less dependent on the actual time of test execution. In addition, a new test data provider method dataGetAccessTree() and a new test method testGetAccessTree() have been added, aiding in the thorough testing of the ItemsStorage class.

Copy link

codecov bot commented Feb 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (18308ab) 99.81% compared to head (92fc987) 100.00%.

Additional details and impacted files
@@              Coverage Diff              @@
##             master      #241      +/-   ##
=============================================
+ Coverage     99.81%   100.00%   +0.18%     
  Complexity      216       216              
=============================================
  Files            13        13              
  Lines           539       539              
=============================================
+ Hits            538       539       +1     
+ Misses            1         0       -1     

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

@arogachev arogachev marked this pull request as ready for review February 9, 2024 11:16
@arogachev arogachev merged commit c7fb807 into master Feb 9, 2024
22 of 25 checks passed
@arogachev arogachev deleted the access-tree-tests branch February 9, 2024 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add tests for ItemsStorage::getAccessTree()
1 participant