@@ -1239,3 +1239,56 @@ Feature: Export content.
12391239 """
12401240 Error: Term is missing a parent
12411241 """
1242+
1243+ @require-wp-5.2 @require-mysql
1244+ Scenario : Export posts with future status
1245+ Given a WP install
1246+ And I run `wp plugin install wordpress-importer --activate`
1247+ And I run `wp site empty --yes`
1248+
1249+ When I run `wp post create --post_title='Future Post 1' --post_status=future --post_date='2050-01-01 12:00:00' --porcelain`
1250+ Then STDOUT should be a number
1251+ And save STDOUT as {FUTURE_POST_1}
1252+
1253+ When I run `wp post create --post_title='Future Post 2' --post_status=future --post_date='2050-01-02 12:00:00' --porcelain`
1254+ Then STDOUT should be a number
1255+ And save STDOUT as {FUTURE_POST_2}
1256+
1257+ When I run `wp post list --post_status=future --format=count`
1258+ Then STDOUT should be:
1259+ """
1260+ 2
1261+ """
1262+
1263+ When I run `wp export --post_type=post --post_status=future`
1264+ And save STDOUT 'Writing to file %s' as {EXPORT_FILE}
1265+ Then the {EXPORT_FILE} file should contain:
1266+ """
1267+ <wp:post_id>{FUTURE_POST_1}</wp:post_id>
1268+ """
1269+ And the {EXPORT_FILE} file should contain:
1270+ """
1271+ <wp:status>future</wp:status>
1272+ """
1273+ And the {EXPORT_FILE} file should contain:
1274+ """
1275+ <wp:post_date>2050-01-01 12:00:00</wp:post_date>
1276+ """
1277+
1278+ When I run `wp site empty --yes`
1279+ Then STDOUT should not be empty
1280+
1281+ When I run `wp post list --post_status=future --format=count`
1282+ Then STDOUT should be:
1283+ """
1284+ 0
1285+ """
1286+
1287+ When I run `wp import {EXPORT_FILE} --authors=skip`
1288+ Then STDOUT should not be empty
1289+
1290+ When I run `wp post list --post_status=future --format=count`
1291+ Then STDOUT should be:
1292+ """
1293+ 2
1294+ """
0 commit comments