WordPress.org

Make WordPress Core

Changeset 1199 in tests


Ignore:
Timestamp:
01/31/13 21:22:57 (2 years ago)
Author:
nbachiyski
Message:

Rename generators to formatters

Location:
trunk/tests/export
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/export/functions.export.php

    r1136 r1199  
    2020 
    2121class Test_WP_Export_Stub_Writer_Throws_Export_Exception { 
    22     function __construct( $xml_generator ) { 
     22    function __construct( $formatter ) { 
    2323    } 
    2424    function export() { 
     
    2828 
    2929class Test_WP_Export_Stub_Writer_Throws_Other_Exception { 
    30     function __construct( $xml_generator ) { 
     30    function __construct( $formatter ) { 
    3131    } 
    3232    function export() { 
  • trunk/tests/export/writers.php

    r1136 r1199  
    99class Test_WP_Export_Writers extends WP_UnitTestCase { 
    1010    function test_export_returner_returns_all_the_return_values() { 
    11         $returner = new WP_Export_Returner( $this->get_x_generator() ); 
     11        $returner = new WP_Export_Returner( $this->get_x_formatter() ); 
    1212        $this->assertEquals( 'xxx' , $returner->export() ); 
    1313    } 
    1414 
    15     private function get_x_generator() { 
     15    private function get_x_formatter() { 
    1616        $methods = array( 'before_posts', 'posts', 'after_posts' ); 
    17         $xml_generator = $this->getMock( 'WP_WXR_XML_Generator', $methods, array( null ) ); 
     17        $formatter = $this->getMock( 'WP_Export_WXR_Formatter', $methods, array( null ) ); 
    1818        foreach( $methods as $method ) { 
    1919            $return = 'posts' == $method? array( 'x' ) : 'x'; 
    20             $xml_generator->expects( $this->once() )->method( $method )->with()->will( $this->returnValue( $return ) ); 
     20            $formatter->expects( $this->once() )->method( $method )->with()->will( $this->returnValue( $return ) ); 
    2121        } 
    22         return $xml_generator; 
     22        return $formatter; 
    2323    } 
    2424} 
Note: See TracChangeset for help on using the changeset viewer.