Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also orlearn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also.Learn more about diff comparisons here.
base repository:10up/wp_mock
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base:1.1.0
Choose a base ref
Loading
...
head repository:10up/wp_mock
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare:trunk
Choose a head ref
Loading
  • 5commits
  • 4files changed
  • 4contributors

Commits on Mar 17, 2025

  1. Fix: MultipleonFilter call issues related to thewithAnyArgs met…

    …hod (#259)# Summary <!-- Required -->This PR implements a fix for an issue I discovered when using multiple`onFilter` calls with the `withAnyArgs` method.<img width="807" alt="Screenshot 2025-03-12 at 18 47 52"src="https://github.com/user-attachments/assets/3c1bb38a-830a-4a4a-907c-a61b7f0d8e11"/>###Closes:#258 ## Details <!-- Optional -->While writing some unit test cases using the `withAnyArgs` method, Icame across issues for multiple `onFilter` calls introduced into thetests. At the moment, if a single `onFilter` call is used alongside`withAnyArgs`, it works correctly, but for multiple cases, it doesn'tcorrectly pass the tests. The expected behaviour should be that thisworks for both single and multiple use cases using the `withAnyArgs`.This PR fixes this issue correctly.<img width="587" alt="Screenshot 2025-03-12 at 19 42 19"src="https://github.com/user-attachments/assets/46cfd651-62a7-455b-9b58-257d38a78b84"/>---Run tests:```phpvendor/bin/phpunit ./tests/Unit/WP_MockTest.php ```## Contributor checklist <!-- Required -->- [x] I agree to follow this project's [**Code ofConduct**](https://github.com/10up/.github/blob/trunk/CODE_OF_CONDUCT.md).- [x] I have updated the documentation accordingly - [x] I have added tests to cover changes introduced by this pullrequest- [x] All new and existing tests pass## Testing <!-- Required -->```phppublic function testMultipleOnFilterPassesWithAnyArgs(): void{    WP_Mock::bootstrap();    /** @phpstan-ignore-next-line */    WP_Mock::onFilter('testFilter1')        ->withAnyArgs()        ->reply('Filtered value 1');    /** @phpstan-ignore-next-line */    WP_Mock::onFilter('testFilter2')        ->withAnyArgs()        ->reply('Filtered value 2');    /** @phpstan-ignore-next-line */    WP_Mock::onFilter('testFilter3')        ->withAnyArgs()        ->reply('Filtered value 3');    $filtered_value1 = apply_filters('testFilter1', 'Original value 1');    $filtered_value2 = apply_filters('testFilter2', 'Original value 2');    $filtered_value3 = apply_filters('testFilter3', 'Original value 3');    $this->assertSame('Filtered value 1', $filtered_value1);    $this->assertSame('Filtered value 2', $filtered_value2);    $this->assertSame('Filtered value 3', $filtered_value3);    Mockery::close();}```Run test, it should pass successfully multiple times using the`withAnyArgs` method:```bashcomposer run test```<!-- List any configuration requirements for testing. -->### Reviewer checklist <!-- Required --><!-- The following checklist is for the reviewer: add any steps that maybe relevant while reviewing this pull request -->- [x] Code changes review- [ ] Documentation changes review- [x] Unit tests pass- [x] Static analysis passes---------Co-authored-by: Ashley Gibson <99189195+agibson-godaddy@users.noreply.github.com>
    @badasswp@agibson-godaddy
    badasswp andagibson-godaddy authoredMar 17, 2025
    Configuration menu
    Copy the full SHA
    8d6c23dView commit details
    Browse the repository at this point in the history

Commits on Dec 2, 2025

  1. Configuration menu
    Copy the full SHA
    38d3e19View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    79dea7fView commit details
    Browse the repository at this point in the history
  3. Update CHANGELOG for version 1.1.1

    Updated changelog for version 1.1.1 with fixes and new features.
    @wvega-godaddy
    wvega-godaddy authoredDec 2, 2025
    Configuration menu
    Copy the full SHA
    5a0418cView commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    446ea70View commit details
    Browse the repository at this point in the history
Loading

[8]ページ先頭

©2009-2025 Movatter.jp