Skip to content

Instantly share code, notes, and snippets.

@pbiron

pbiron/base.php

Last active Jul 12, 2017
Embed
What would you like to do?
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