From eba9bf7171ebb15d77ce93d4a1009d7fa734c073 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Thu, 29 May 2014 20:39:05 +0000 Subject: [PATCH] These unit tests should point at an actual attachment file. See [28619]. git-svn-id: https://develop.svn.wordpress.org/trunk@28621 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/post/query.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/phpunit/tests/post/query.php b/tests/phpunit/tests/post/query.php index 1d746fc0b7..ee7d64332d 100644 --- a/tests/phpunit/tests/post/query.php +++ b/tests/phpunit/tests/post/query.php @@ -706,23 +706,24 @@ class Tests_Post_Query extends WP_UnitTestCase { function test_post__in_attachment_ordering() { $post_id = $this->factory->post->create(); $att_ids = array(); - $att_ids[1] = $this->factory->attachment->create_object( 'woo1.jpg', $post_id, array( + $file = DIR_TESTDATA . '/images/canola.jpg'; + $att_ids[1] = $this->factory->attachment->create_object( $file, $post_id, array( 'post_mime_type' => 'image/jpeg', 'menu_order' => rand( 1, 100 ) ) ); - $att_ids[2] = $this->factory->attachment->create_object( 'woo2.jpg', $post_id, array( + $att_ids[2] = $this->factory->attachment->create_object( $file, $post_id, array( 'post_mime_type' => 'image/jpeg', 'menu_order' => rand( 1, 100 ) ) ); - $att_ids[3] = $this->factory->attachment->create_object( 'woo3.jpg', $post_id, array( + $att_ids[3] = $this->factory->attachment->create_object( $file, $post_id, array( 'post_mime_type' => 'image/jpeg', 'menu_order' => rand( 1, 100 ) ) ); - $att_ids[4] = $this->factory->attachment->create_object( 'woo4.jpg', $post_id, array( + $att_ids[4] = $this->factory->attachment->create_object( $file, $post_id, array( 'post_mime_type' => 'image/jpeg', 'menu_order' => rand( 1, 100 ) ) ); - $att_ids[5] = $this->factory->attachment->create_object( 'woo5.jpg', $post_id, array( + $att_ids[5] = $this->factory->attachment->create_object( $file, $post_id, array( 'post_mime_type' => 'image/jpeg', 'menu_order' => rand( 1, 100 ) ) );