Skip to content

Instantly share code, notes, and snippets.

@pbiron
Last active July 12, 2017 15:41
Show Gist options
  • Save pbiron/7f18609bab6559c2fc91255b4d56697c to your computer and use it in GitHub Desktop.
Save pbiron/7f18609bab6559c2fc91255b4d56697c to your computer and use it in GitHub Desktop.
base class for WP export unit tests
<?php
abstract class WXR_Export_UnitTestCase extends WP_UnitTestCase {
protected function _export_wp( $args ) {
ob_start();
export_wp( $args );
$wxr = ob_get_contents();
ob_end_clean();
return $wxr;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment