wp-cli / media-command

Imports files as attachments, regenerates thumbnails, or lists registered image sizes.
MIT License
44 stars 41 forks source link

Get custom image sizes only once with the correct info #117

Closed grappler closed 1 year ago

grappler commented 5 years ago

fixes #116

Need to figure out to test it locally.

schlessera commented 4 years ago

This code currently throws errors when you run the image size tests:

Image 2019-11-11 at 12 24 43 PM

In terms of adding specific testing, I think we'd need to extend the following code to support a STDOUT should be a table not containing rows step: https://github.com/wp-cli/wp-cli-tests/blob/f75bae4bcd092e504f0f6101ee4632cb99f4c3eb/features/steps/then.php#L51-L64

Not sure it can be adapted or needs to be duplicated and modified.

schlessera commented 4 years ago

Another way of testing could be to run the command again with --format=csv or format=json, as you can then use a string check to make sure a certain size combination is not present.

schlessera commented 4 years ago

@grappler Still interested in getting this across the line?

pmbaldha commented 4 years ago

@schlessera @grappler I have fixed it in the https://github.com/wp-cli/media-command/pull/126 by changing only one file.

danielbachhuber commented 1 year ago

Proceeding with https://github.com/wp-cli/wp-cli/issues/5594 for this repository. I've captured this PR to https://gist.github.com/danielbachhuber/141acf99780d4b4979e5e66edb059ffc in case this PR is auto-closed or broken in some way.