[wp-trac] [WordPress Trac] #28146: Export Filter for Post IDs

WordPress Trac noreply at wordpress.org
Mon Sep 14 21:10:48 UTC 2015


#28146: Export Filter for Post IDs
----------------------------------------+-----------------------------
 Reporter:  zourbuth                    |       Owner:  westonruter
     Type:  enhancement                 |      Status:  accepted
 Priority:  normal                      |   Milestone:  4.4
Component:  Export                      |     Version:  2.1
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:  administration
----------------------------------------+-----------------------------

Comment (by ivanblagdan):

 I've tried writing a couple of tests for this as well, but getting
 export_wp() to run gets me nowhere with the test stalling at the command
 line. There are 25 posts created via setUpBeforeClass() as a sample.

 Here's a stab at running it in a test class, found this approach among the
 other tests somewhere.
 {{{
         function do_export(){
                 ob_start();
                 try {
                         @require_once(ABSPATH . 'wp-
 admin/includes/export.php');
                         export_wp();
                         $out = ob_get_clean();
                 } catch (Exception $e) {
                         $out = ob_get_clean();
                         throw($e);
                 }
                 return $out;
         }
 }}}


 Not sure if I'm handling this wrong, any suggestions for a test are
 appreciated.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/28146#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list