Unit Tests: consolidate the many separate implementations of _make_attachment() into a helper method on WP_UnitTestCase.

Fixes #34075.


git-svn-id: https://develop.svn.wordpress.org/trunk@35309 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2015-10-21 01:58:52 +00:00
parent ede4050ace
commit f5921a0c98
8 changed files with 39 additions and 166 deletions

View File

@@ -104,8 +104,6 @@ class Tests_Image_Header extends WP_UnitTestCase {
}
function test_create_attachment_object() {
global $custom_image_header;
$id = wp_insert_attachment( array(
'post_status' => 'publish',
'post_title' => 'foo.png',
@@ -123,8 +121,6 @@ class Tests_Image_Header extends WP_UnitTestCase {
}
function test_insert_cropped_attachment() {
global $custom_image_header;
$id = wp_insert_attachment( array(
'post_status' => 'publish',
'post_title' => 'foo.png',