Remove skipped tests related to the proposed Export API.

These tests have been added as a patch to #22435.

See #30284.

git-svn-id: https://develop.svn.wordpress.org/trunk@31253 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Boone Gorges 2015-01-20 20:57:08 +00:00
parent e3bff14246
commit 70eee8514b
2 changed files with 0 additions and 71 deletions

View File

@ -1,43 +0,0 @@
<?php
/**
* Test export functions
*
* @group export
* @ticket 22435
*/
class Test_WP_Export_Functions extends WP_UnitTestCase {
function setUp() {
if ( ! function_exists( 'wp_export' ) ) {
$this->markTestSkipped( "wp_export function doesn't exist" );
}
parent::setUp();
}
function test_wp_export_returns_wp_error_if_the_writer_throws_Export_exception() {
$this->assertTrue( is_wp_error( wp_export( array( 'writer' => 'Test_WP_Export_Stub_Writer_Throws_Export_Exception' ) ) ) );
}
function test_wp_export_passes_the_exception_if_the_writer_throws_other_exception() {
$this->setExpectedException( 'Exception' );
wp_export( array( 'writer' => 'Test_WP_Export_Stub_Writer_Throws_Other_Exception' ) );
}
}
class Test_WP_Export_Stub_Writer_Throws_Export_Exception {
function __construct( $formatter ) {
}
function export() {
throw new WP_Export_Exception( 'baba' );
}
}
class Test_WP_Export_Stub_Writer_Throws_Other_Exception {
function __construct( $formatter ) {
}
function export() {
throw new Exception( 'baba' );
}
}

View File

@ -1,28 +0,0 @@
<?php
/**
* Test WP_Export_*_Writer classes
*
* @group export
* @ticket 22435
*/
class Test_WP_Export_Writers extends WP_UnitTestCase {
function test_export_returner_returns_all_the_return_values() {
if ( ! class_exists( 'WP_Export_Returner' ) ) {
$this->markTestSkipped( "WP_Export_Returner class doesn't exist" );
}
$returner = new WP_Export_Returner( $this->get_x_formatter() );
$this->assertEquals( 'xxx' , $returner->export() );
}
private function get_x_formatter() {
$methods = array( 'before_posts', 'posts', 'after_posts' );
$formatter = $this->getMock( 'WP_Export_WXR_Formatter', $methods, array( null ) );
foreach( $methods as $method ) {
$return = 'posts' == $method? array( 'x' ) : 'x';
$formatter->expects( $this->once() )->method( $method )->with()->will( $this->returnValue( $return ) );
}
return $formatter;
}
}