Skip to content

phpcs fixes 2#2901

Closed
sol-loup wants to merge 7 commits intomainfrom
phpcs-fixes-2
Closed

phpcs fixes 2#2901
sol-loup wants to merge 7 commits intomainfrom
phpcs-fixes-2

Conversation

@sol-loup
Copy link
Copy Markdown
Contributor

@sol-loup sol-loup commented Feb 25, 2025

Changes proposed in this Pull Request:

Closes # .

Replace this with a good description of your changes & reasoning.

  • Do the changed files pass phpcs checks? Please remove phpcs:ignore comments in changed files and fix any issues, or delete if not practical.

Screenshots:

Detailed test instructions:

Additional details:

Changelog entry

Comment on lines 193 to 196
}


}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although the error message is cryptic, I think these duplicate closing brackets are causing the unit test failures

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@sol-loup has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@sol-loup has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@sol-loup has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@sol-loup merged this pull request in 5c6403f.

vahidkay-meta pushed a commit that referenced this pull request Mar 5, 2025
Summary:
- Enable code coverage report generation with phpunit (#2893)
- [Cleanup] remove phpcs:ignoreFile annotations preventing code formatting on several smaller files
- Removing unneeded PHPCS-ignore for more files

### Changes proposed in this Pull Request:

Closes # .

_Replace this with a good description of your changes & reasoning._

- [ ] Do the changed files pass `phpcs` checks? Please remove `phpcs:ignore` comments in changed files and fix any issues, or delete if not practical.

### Screenshots:

### Detailed test instructions:

1.
2.
3.

### Additional details:

<!--
Optional.
Enter a summary of all changes in this Pull Request, which will be added to the changelog if accepted.
Each line should start with change type prefix`(Fix|Add|…) - `, for example:
> Break - A change breaking previous API or functionality.
> Add - A new feature, function or functionality was added.
> Update - Big changes to something that wasn't broken.
> Fix - Took care of something that wasn't working.
> Tweak - Small change, that isn't actually very important.
> Dev - Developer-facing only change.
> Doc - Updated customer or developer facing documentation

If you remove the "Changelog entry" header, the Pull Request title will be used as the changelog entry.

Add the `changelog: none` label if no changelog entry is needed.
-->
### Changelog entry

>

Pull Request resolved: #2901

Test Plan:
Imported from GitHub, without a `Test Plan:` line.

**!---- (auto-generated) DO NOT EDIT OR PUT ANYTHING AFTER THIS LINE ----!**
MFTRunTestsScript Run / Test Suite: sa_checkout / Test Collection: bloks / Diff Version V2
https://internalfb.com/intern/testinfra/testrun/15199648812872431
MFTRunTestsScript Run / Test Suite: sa_checkout / Test Collection: www / Diff Version V2
https://internalfb.com/intern/testinfra/testrun/8725724532540319

Reviewed By: carterbuce, ajello-meta

Differential Revision: D70353516

Pulled By: sol-loup

fbshipit-source-id: e58662afe8ac8175a5001e6481d85efdbf0957f5
This was referenced Mar 5, 2025
facebook-github-bot pushed a commit that referenced this pull request Mar 7, 2025
Summary:
# Add Unit Tests for AsyncRequest Class
Adds comprehensive unit tests for the AsyncRequest utility class. The tests verify:
- Proper initialization of the class with correct action hooks
- Request data handling via set_data()
- Dispatch functionality with appropriate URL and arguments
- Nonce verification in the request handling flow

The implementation uses PHPUnit's mocking capabilities to intercept WordPress HTTP requests, as it's less straightforward / efficient to record and playback real network calls.

I've verified that the changes originally pushed in #2901  and reverted in #2921 cause these tests to fail.

Closes # .

_Replace this with a good description of your changes & reasoning._

- [ ] Do the changed files pass `phpcs` checks? Please remove `phpcs:ignore` comments in changed files and fix any issues, or delete if not practical.

### Screenshots:

### Detailed test instructions:

1.
2.
3.

### Additional details:

<!--
Optional.
Enter a summary of all changes in this Pull Request, which will be added to the changelog if accepted.
Each line should start with change type prefix`(Fix|Add|…) - `, for example:
> Break - A change breaking previous API or functionality.
> Add - A new feature, function or functionality was added.
> Update - Big changes to something that wasn't broken.
> Fix - Took care of something that wasn't working.
> Tweak - Small change, that isn't actually very important.
> Dev - Developer-facing only change.
> Doc - Updated customer or developer facing documentation

If you remove the "Changelog entry" header, the Pull Request title will be used as the changelog entry.

Add the `changelog: none` label if no changelog entry is needed.
-->
### Changelog entry

>

Pull Request resolved: #2922

Test Plan:
Imported from GitHub, without a `Test Plan:` line.

**!---- (auto-generated) DO NOT EDIT OR PUT ANYTHING AFTER THIS LINE ----!**
MFTRunTestsScript Run / Test Suite: sa_checkout / Test Collection: bloks / Diff Version V1
https://internalfb.com/intern/testinfra/testrun/17451448627576264
MFTRunTestsScript Run / Test Suite: sa_checkout / Test Collection: www / Diff Version V1
https://internalfb.com/intern/testinfra/testrun/1125900312114451

Reviewed By: carterbuce, jczhuoMeta

Differential Revision: D70733339

Pulled By: sol-loup

fbshipit-source-id: 2fc7f837913cbe021ffa143021900076d80ee030
tzahgr pushed a commit that referenced this pull request Mar 24, 2025
Summary:
- Enable code coverage report generation with phpunit (#2893)
- [Cleanup] remove phpcs:ignoreFile annotations preventing code formatting on several smaller files
- Removing unneeded PHPCS-ignore for more files

### Changes proposed in this Pull Request:

Closes # .

_Replace this with a good description of your changes & reasoning._

- [ ] Do the changed files pass `phpcs` checks? Please remove `phpcs:ignore` comments in changed files and fix any issues, or delete if not practical.

### Screenshots:

### Detailed test instructions:

1.
2.
3.

### Additional details:

<!--
Optional.
Enter a summary of all changes in this Pull Request, which will be added to the changelog if accepted.
Each line should start with change type prefix`(Fix|Add|…) - `, for example:
> Break - A change breaking previous API or functionality.
> Add - A new feature, function or functionality was added.
> Update - Big changes to something that wasn't broken.
> Fix - Took care of something that wasn't working.
> Tweak - Small change, that isn't actually very important.
> Dev - Developer-facing only change.
> Doc - Updated customer or developer facing documentation

If you remove the "Changelog entry" header, the Pull Request title will be used as the changelog entry.

Add the `changelog: none` label if no changelog entry is needed.
-->
### Changelog entry

>

Pull Request resolved: #2901

Test Plan:
Imported from GitHub, without a `Test Plan:` line.

**!---- (auto-generated) DO NOT EDIT OR PUT ANYTHING AFTER THIS LINE ----!**
MFTRunTestsScript Run / Test Suite: sa_checkout / Test Collection: bloks / Diff Version V2
https://internalfb.com/intern/testinfra/testrun/15199648812872431
MFTRunTestsScript Run / Test Suite: sa_checkout / Test Collection: www / Diff Version V2
https://internalfb.com/intern/testinfra/testrun/8725724532540319

Reviewed By: carterbuce, ajello-meta

Differential Revision: D70353516

Pulled By: sol-loup

fbshipit-source-id: e58662afe8ac8175a5001e6481d85efdbf0957f5
@tzahgr tzahgr mentioned this pull request Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants