diff --git a/tests/phpunit/tests/export/functions.export.php b/tests/phpunit/tests/export/functions.export.php deleted file mode 100644 index e3b77e7da6..0000000000 --- a/tests/phpunit/tests/export/functions.export.php +++ /dev/null @@ -1,43 +0,0 @@ -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' ); - } -} diff --git a/tests/phpunit/tests/export/writers.php b/tests/phpunit/tests/export/writers.php deleted file mode 100644 index 6715d17559..0000000000 --- a/tests/phpunit/tests/export/writers.php +++ /dev/null @@ -1,28 +0,0 @@ -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; - } -} -