Changeset 861 in tests
- Timestamp:
- 07/02/2012 11:00:45 AM (14 years ago)
- File:
-
- 1 edited
-
trunk/wp-testcase/test_import_wp.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-testcase/test_import_wp.php
r815 r861 31 31 assert('is_file($file)'); 32 32 33 $authors = $mapping = array();33 $authors = $mapping = $new = array(); 34 34 $i = 0; 35 35 … … 233 233 234 234 $post = $result['posts'][0]; 235 $this->assertEquals( 'Content with nested <![CDATA[ tags ]]> :)', $post['post_content'] , $message);235 $this->assertEquals( 'Content with nested <![CDATA[ tags ]]> :)', $post['post_content'] ); 236 236 foreach ( $post['postmeta'] as $meta ) { 237 237 switch ( $meta['key'] ) { … … 241 241 default: $this->fail( 'Unknown postmeta (' . $meta['key'] . ') was parsed out by' . $p ); 242 242 } 243 $this->assertEquals( $value, $meta['value'] , $message);243 $this->assertEquals( $value, $meta['value'] ); 244 244 } 245 245 } … … 490 490 491 491 function test_serialized_postmeta_no_cdata() { 492 $this->_import_wp( DIR_TESTDATA . '/export/test-serialized-postmeta-no-cdata.xml', array( 'johncoswell' => false) );492 $this->_import_wp( DIR_TESTDATA . '/export/test-serialized-postmeta-no-cdata.xml', array( 'johncoswell' => 'john' ) ); 493 493 $expected['special_post_title'] = 'A special title'; 494 494 $expected['is_calendar'] = ''; … … 497 497 498 498 function test_utw_postmeta() { 499 $this->_import_wp( DIR_TESTDATA . '/export/test-utw-post-meta-import.xml', array( 'johncoswell' => false) );499 $this->_import_wp( DIR_TESTDATA . '/export/test-utw-post-meta-import.xml', array( 'johncoswell' => 'john' ) ); 500 500 501 501 $classy = new StdClass(); … … 561 561 // #9633 562 562 function test_serialized_postmeta_with_cdata() { 563 $this->_import_wp( DIR_TESTDATA . '/export/test-serialized-postmeta-with-cdata.xml', array( 'johncoswell' => false) );563 $this->_import_wp( DIR_TESTDATA . '/export/test-serialized-postmeta-with-cdata.xml', array( 'johncoswell' => 'johncoswell' ) ); 564 564 565 565 //HTML in the CDATA should work with old WordPress version … … 573 573 // #11574 574 574 function test_serialized_postmeta_with_evil_stuff_in_cdata() { 575 $this->_import_wp( DIR_TESTDATA . '/export/test-serialized-postmeta-with-cdata.xml', array( 'johncoswell' => false) );575 $this->_import_wp( DIR_TESTDATA . '/export/test-serialized-postmeta-with-cdata.xml', array( 'johncoswell' => 'johncoswell' ) ); 576 576 // evil content in the CDATA 577 577 $this->assertEquals( '<wp:meta_value>evil</wp:meta_value>', get_post_meta( 10, 'evil', true ) );
Note: See TracChangeset
for help on using the changeset viewer.