Changeset 47122 for trunk/tests/phpunit/tests/import/import.php
- Timestamp:
- 01/29/2020 12:43:23 AM (6 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/import/import.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/import/import.php
r46586 r47122 27 27 28 28 global $wpdb; 29 // crude but effective: make sure there's no residual data in the main tables29 // Crude but effective: make sure there's no residual data in the main tables. 30 30 foreach ( array( 'posts', 'postmeta', 'comments', 'terms', 'term_taxonomy', 'term_relationships', 'users', 'usermeta' ) as $table ) { 31 31 // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared … … 50 50 $this->_import_wp( DIR_TESTDATA . '/export/small-export.xml', $authors ); 51 51 52 // ensure that authors were imported correctly52 // Ensure that authors were imported correctly. 53 53 $user_count = count_users(); 54 54 $this->assertEquals( 3, $user_count['total_users'] ); … … 65 65 $this->assertEquals( 'author@example.org', $author->user_email ); 66 66 67 // check that terms were imported correctly67 // Check that terms were imported correctly. 68 68 $this->assertEquals( 30, wp_count_terms( 'category' ) ); 69 69 $this->assertEquals( 3, wp_count_terms( 'post_tag' ) ); … … 74 74 $this->assertEquals( $bar->term_id, $foo_bar->parent ); 75 75 76 // check that posts/pages were imported correctly76 // Check that posts/pages were imported correctly. 77 77 $post_count = wp_count_posts( 'post' ); 78 78 $this->assertEquals( 5, $post_count->publish ); … … 251 251 function test_ordering_of_importers() { 252 252 global $wp_importers; 253 $_wp_importers = $wp_importers; // Preserve global state 253 $_wp_importers = $wp_importers; // Preserve global state. 254 254 $wp_importers = array( 255 255 'xyz1' => array( 'xyz1' ), … … 269 269 get_importers() 270 270 ); 271 $wp_importers = $_wp_importers; // Restore global state 271 $wp_importers = $_wp_importers; // Restore global state. 272 272 } 273 273 … … 295 295 $this->assertSame( 'Slashes aren\\\'t \"cool\"', $posts[0]->post_content ); 296 296 } 297 298 // function test_menu_import299 297 }
Note: See TracChangeset
for help on using the changeset viewer.