Skip to content

Conversation

@ernilambar
Copy link
Member

Fixes #129

@ernilambar ernilambar force-pushed the 129-format-core-update branch from 7b7f36b to 3f2950a Compare March 8, 2024 09:41
@ernilambar ernilambar marked this pull request as ready for review March 11, 2024 04:48
@ernilambar ernilambar requested a review from a team as a code owner March 11, 2024 04:48
@schlessera schlessera changed the title Add format in core update Add --format flag in core update Mar 14, 2024
@ernilambar
Copy link
Member Author

ernilambar commented Mar 14, 2024

Looks like we dont have should contain a table containing rows. Regarding table we have should be a table containing rows and should end with a table containing rows. Both conditions are not applicable in this case.

Our output would be like this:

Starting update...
Unpacking the update...
Cleaning up files...
No files found that need cleaning up.
name	old_version	new_version	status
core	6.0	6.1	Updated
Success: WordPress updated successfully.

@schlessera Any suggestion how we can implement test for table in this case?

Or, should be implement quiet logger for table also?

@ernilambar
Copy link
Member Author

Looks like should end with a table containing rows does not necessarily check the table in the end. May be we should introduce should contain a table containing rows and also fix this feature context.

@BrianHenryIE
Copy link
Member

I would lean towards implementing the quiet logger for table output too.

And I can confirm ThenStepDefinitions::then_stdout_should_end_with_a_table_containing_rows() does not test that the table is at the end of the output. It searches stdout for the table header and checks the remainder of stdout for the expected rows. It would be somewhat more accurately named then_stdout_should_contain_a_table_containing_rows, but if output contained two tables, it could incorrectly pass if the second table coincidentally contained the row values that were expected in the first table.

@ernilambar
Copy link
Member Author

Anything that needs to be updated here?

@swissspidy swissspidy added this to the 2.2.0 milestone Nov 2, 2025
@codecov
Copy link

codecov bot commented Nov 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@swissspidy swissspidy merged commit f2e0cec into wp-cli:main Nov 2, 2025
43 checks passed
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.

Format for 'wp core update'

4 participants