@@ -4,10 +4,10 @@ Feature: Manage WordPress attachments
44 Given a WP install
55
66 Scenario : Import media from remote URL
7- When I run `wp media import 'http://wp-cli.org /behat-data/codeispoetry.png' --post_id=1`
7+ When I run `wp media import 'http://wp-cli.github.io /behat-data/codeispoetry.png' --post_id=1`
88 Then STDOUT should contain:
99 """
10- Imported file 'http://wp-cli.org /behat-data/codeispoetry.png'
10+ Imported file 'http://wp-cli.github.io /behat-data/codeispoetry.png'
1111 """
1212 And STDOUT should contain:
1313 """
@@ -26,7 +26,7 @@ Feature: Manage WordPress attachments
2626 """
2727
2828 Scenario : Import media from remote URL and use input file as attachment name
29- When I run `wp media import 'http://wp-cli.org /behat-data/codeispoetry.png' --file_name=abc`
29+ When I run `wp media import 'http://wp-cli.github.io /behat-data/codeispoetry.png' --file_name=abc`
3030 Then STDOUT should contain:
3131 """
3232 file name abc.png
@@ -57,7 +57,7 @@ Feature: Manage WordPress attachments
5757 Scenario : Import a file as attachment from a local image
5858 Given download:
5959 | path | url |
60- | {CACHE_DIR }/large -image .jpg | http ://wp -cli .org /behat -data /large -image .jpg |
60+ | {CACHE_DIR }/large -image .jpg | http ://wp -cli .github . io /behat -data /large -image .jpg |
6161
6262 When I run `wp media import {CACHE_DIR}/large-image.jpg --post_id=1 --featured_image`
6363 Then STDOUT should contain:
@@ -74,7 +74,7 @@ Feature: Manage WordPress attachments
7474 Scenario : Import a file as attachment from a local image and preserve the file modified time.
7575 Given download:
7676 | path | url |
77- | {CACHE_DIR }/large -image .jpg | http ://wp -cli .org /behat -data /large -image .jpg |
77+ | {CACHE_DIR }/large -image .jpg | http ://wp -cli .github . io /behat -data /large -image .jpg |
7878 And I run `TZ=UTC touch -t 8001031305 {CACHE_DIR}/large-image.jpg`
7979 And I run `wp option update gmt_offset -5`
8080
@@ -96,7 +96,7 @@ Feature: Manage WordPress attachments
9696 Scenario : Import a file as an attachment but porcelain style
9797 Given download:
9898 | path | url |
99- | {CACHE_DIR }/large -image .jpg | http ://wp -cli .org /behat -data /large -image .jpg |
99+ | {CACHE_DIR }/large -image .jpg | http ://wp -cli .github . io /behat -data /large -image .jpg |
100100
101101 When I run `wp media import {CACHE_DIR}/large-image.jpg --title="My imported attachment" --caption="My fabulous caption" --post_name="My post name" --porcelain`
102102 Then save STDOUT as {ATTACHMENT_ID}
@@ -122,7 +122,7 @@ Feature: Manage WordPress attachments
122122 Scenario : Import a file as attachment from a local image and leave it in it's current location
123123 Given download:
124124 | path | url |
125- | {CACHE_DIR }/large -image .jpg | http ://wp -cli .org /behat -data /large -image .jpg |
125+ | {CACHE_DIR }/large -image .jpg | http ://wp -cli .github . io /behat -data /large -image .jpg |
126126 And I run `wp option update uploads_use_yearmonth_folders 0`
127127
128128 When I run `wp media import {CACHE_DIR}/large-image.jpg --skip-copy`
@@ -141,7 +141,7 @@ Feature: Manage WordPress attachments
141141 Scenario : Import a file and use its filename as the title
142142 Given download:
143143 | path | url |
144- | {CACHE_DIR }/large -image .jpg | http ://wp -cli .org /behat -data /large -image .jpg |
144+ | {CACHE_DIR }/large -image .jpg | http ://wp -cli .github . io /behat -data /large -image .jpg |
145145
146146 When I run `wp media import {CACHE_DIR}/large-image.jpg --porcelain`
147147 Then save STDOUT as {ATTACHMENT_ID}
@@ -155,7 +155,7 @@ Feature: Manage WordPress attachments
155155 Scenario : Import a file and persist its original metadata
156156 Given download:
157157 | path | url |
158- | {CACHE_DIR }/canola .jpg | http ://wp -cli .org /behat -data /canola .jpg |
158+ | {CACHE_DIR }/canola .jpg | http ://wp -cli .github . io /behat -data /canola .jpg |
159159
160160 When I run `wp media import {CACHE_DIR}/canola.jpg --porcelain`
161161 Then save STDOUT as {ATTACHMENT_ID}
@@ -173,7 +173,7 @@ Feature: Manage WordPress attachments
173173 """
174174
175175 Scenario : Make sure WordPress receives the slashed data it expects
176- When I run `wp media import 'http://wp-cli.org /behat-data/codeispoetry.png' --post_id=1 --title='My\T itle' --caption='Caption\H ere' --alt='Alt\H ere' --desc='Desc\H ere' --porcelain`
176+ When I run `wp media import 'http://wp-cli.github.io /behat-data/codeispoetry.png' --post_id=1 --title='My\T itle' --caption='Caption\H ere' --alt='Alt\H ere' --desc='Desc\H ere' --porcelain`
177177 Then save STDOUT as {ATTACHMENT_ID}
178178
179179 When I run `wp post get {ATTACHMENT_ID} --format=csv --fields=post_title,post_excerpt,post_content`
@@ -199,27 +199,27 @@ Feature: Manage WordPress attachments
199199 Scenario : Import multiple images
200200 Given download:
201201 | path | url |
202- | {CACHE_DIR }/large -image .jpg | http ://wp -cli .org /behat -data /large -image .jpg |
202+ | {CACHE_DIR }/large -image .jpg | http ://wp -cli .github . io /behat -data /large -image .jpg |
203203
204- When I run `wp media import 'http://wp-cli.org /behat-data/codeispoetry.png' {CACHE_DIR}/large-image.jpg`
204+ When I run `wp media import 'http://wp-cli.github.io /behat-data/codeispoetry.png' {CACHE_DIR}/large-image.jpg`
205205 Then STDOUT should contain:
206206 """
207207 Success: Imported 2 of 2 items.
208208 """
209209
210210 Scenario : Fail to import one image but continue trying the next
211- When I try `wp media import gobbledygook.png 'http://wp-cli.org /behat-data/codeispoetry.png' `
211+ When I try `wp media import gobbledygook.png 'http://wp-cli.github.io /behat-data/codeispoetry.png' `
212212 Then STDERR should contain:
213213 """
214214 Error: Only imported 1 of 2 items.
215215 """
216216 And the return code should be 1
217217
218218 Scenario : Fail when download_url() fails
219- When I try `wp media import 'http://wp-cli.org /404' `
219+ When I try `wp media import 'http://example.com /404' `
220220 Then STDERR should be:
221221 """
222- Warning: Unable to import file 'http://wp-cli.org /404'. Reason: Not Found
222+ Warning: Unable to import file 'http://example.com /404'. Reason: Not Found
223223 Error: No items imported.
224224 """
225225 And the return code should be 1
@@ -235,7 +235,7 @@ Feature: Manage WordPress attachments
235235 Scenario : Return upload URL after importing a single valid file
236236 Given download:
237237 | path | url |
238- | {CACHE_DIR }/large -image .jpg | http ://wp -cli .org /behat -data /large -image .jpg |
238+ | {CACHE_DIR }/large -image .jpg | http ://wp -cli .github . io /behat -data /large -image .jpg |
239239
240240 When I run `wp media import {CACHE_DIR}/large-image.jpg --porcelain=url`
241241 Then STDOUT should contain:
@@ -251,10 +251,10 @@ Feature: Manage WordPress attachments
251251 Scenario : Return upload URL after importing a multiple valid files
252252 Given download:
253253 | path | url |
254- | {CACHE_DIR }/large -image .jpg | http ://wp -cli .org /behat -data /large -image .jpg |
255- | {CACHE_DIR }/audio -with -no -cover .mp3 | http ://wp -cli .org /behat -data /audio -with -no -cover .mp3 |
254+ | {CACHE_DIR }/large -image .jpg | http ://wp -cli .github . io /behat -data /large -image .jpg |
255+ | {CACHE_DIR }/audio -with -no -cover .mp3 | http ://wp -cli .github . io /behat -data /audio -with -no -cover .mp3 |
256256
257- When I run `wp media import 'http://wp-cli.org /behat-data/codeispoetry.png' {CACHE_DIR}/large-image.jpg {CACHE_DIR}/audio-with-no-cover.mp3 --porcelain=url`
257+ When I run `wp media import 'http://wp-cli.github.io /behat-data/codeispoetry.png' {CACHE_DIR}/large-image.jpg {CACHE_DIR}/audio-with-no-cover.mp3 --porcelain=url`
258258 Then STDOUT should contain:
259259 """
260260 https://example.com/wp-content/uploads/
@@ -281,7 +281,7 @@ Feature: Manage WordPress attachments
281281 """
282282
283283 Scenario : Errors when invalid --porcelain flag is applied.
284- When I try `wp media import 'http://wp-cli.org /behat-data/codeispoetry.png' --porcelain=invalid`
284+ When I try `wp media import 'http://wp-cli.github.io /behat-data/codeispoetry.png' --porcelain=invalid`
285285 Then STDERR should be:
286286 """
287287 Error: Invalid value for <porcelain>: invalid. Expected flag or 'url'.
@@ -290,7 +290,7 @@ Feature: Manage WordPress attachments
290290 Scenario : Import media from STDIN
291291 Given download:
292292 | path | url |
293- | {CACHE_DIR }/codeispoetry .png | http ://wp -cli .org /behat -data /codeispoetry .png |
293+ | {CACHE_DIR }/codeispoetry .png | http ://wp -cli .github . io /behat -data /codeispoetry .png |
294294
295295 When I run `cat {CACHE_DIR}/codeispoetry.png | wp media import - --title="From STDIN" --porcelain`
296296 Then save STDOUT as {ATTACHMENT_ID}
@@ -304,7 +304,7 @@ Feature: Manage WordPress attachments
304304 Scenario : Import media from STDIN with file_name
305305 Given download:
306306 | path | url |
307- | {CACHE_DIR }/codeispoetry .png | http ://wp -cli .org /behat -data /codeispoetry .png |
307+ | {CACHE_DIR }/codeispoetry .png | http ://wp -cli .github . io /behat -data /codeispoetry .png |
308308
309309 When I run `cat {CACHE_DIR}/codeispoetry.png | wp media import - --file_name=my-image.png --porcelain`
310310 Then save STDOUT as {ATTACHMENT_ID}
@@ -336,7 +336,7 @@ Feature: Manage WordPress attachments
336336 Scenario: Upload files into a custom directory, relative to ABSPATH, when --destination-dir flag is applied.
337337 Given download:
338338 | path | url |
339- | {CACHE_DIR}/large-image.jpg | http://wp-cli.org /behat-data/large-image.jpg |
339+ | {CACHE_DIR}/large-image.jpg | http://wp-cli.github.io /behat-data/large-image.jpg |
340340 When I run `wp media import --destination-dir="foo" {CACHE_DIR}/large-image.jpg --porcelain=url`
341341
342342 Then STDOUT should not contain:
@@ -352,7 +352,7 @@ Feature: Manage WordPress attachments
352352 Scenario: Upload files into a custom directory, not relative to ABSPATH, when --destination-dir flag is applied.
353353 Given download:
354354 | path | url |
355- | {CACHE_DIR}/large-image.jpg | http://wp-cli.org /behat-data/large-image.jpg |
355+ | {CACHE_DIR}/large-image.jpg | http://wp-cli.github.io /behat-data/large-image.jpg |
356356 When I run `wp media import --destination-dir="{RUN_DIR}/foo" {CACHE_DIR}/large-image.jpg --porcelain=url`
357357
358358 Then STDOUT should not contain:
0 commit comments