Skip to content

Commit

Permalink
add behat test
Browse files Browse the repository at this point in the history
  • Loading branch information
Sidsector9 committed May 11, 2022
1 parent faf5630 commit 78bb587
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions features/media-regenerate.feature
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,23 @@ Feature: Regenerate WordPress attachments
And the wp-content/uploads/large-image-1024x768.jpg file should exist
And the wp-content/uploads/large-image-2048x1536.jpg file should exist

When I run `wp option update medium_size_w 256`
And I run `wp option update medium_size_h 256`
And I run `wp media regenerate {LARGE_ATTACHMENT_ID} --image_size=medium --skip-delete --only-missing`
And I run `wp post meta get {LARGE_ATTACHMENT_ID} _wp_attachment_metadata`
Then STDOUT should contain:
"""
'medium'
"""
And STDOUT should contain:
"""
'large'
"""
And STDOUT should contain:
"""
'thumbnail'
"""

When I run `wp media import {CACHE_DIR}/canola.jpg --title="My imported medium attachment" --porcelain`
Then save STDOUT as {MEDIUM_ATTACHMENT_ID}
And the wp-content/uploads/canola.jpg file should exist
Expand Down

0 comments on commit 78bb587

Please sign in to comment.