Add `--format` flag in `core update`
Fixes https://github.com/wp-cli/core-command/issues/129
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?
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.
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.
Anything that needs to be updated here?