Make WordPress Core

Changeset 28621


Ignore:
Timestamp:
05/29/2014 08:39:05 PM (12 years ago)
Author:
wonderboymusic
Message:

These unit tests should point at an actual attachment file.

See [28619].

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/post/query.php

    r28619 r28621  
    707707                $post_id = $this->factory->post->create();
    708708                $att_ids = array();
    709                 $att_ids[1] = $this->factory->attachment->create_object( 'woo1.jpg', $post_id, array(
     709                $file = DIR_TESTDATA . '/images/canola.jpg';
     710                $att_ids[1] = $this->factory->attachment->create_object( $file, $post_id, array(
    710711                        'post_mime_type' => 'image/jpeg',
    711712                        'menu_order' => rand( 1, 100 )
    712713                ) );
    713                 $att_ids[2] = $this->factory->attachment->create_object( 'woo2.jpg', $post_id, array(
     714                $att_ids[2] = $this->factory->attachment->create_object( $file, $post_id, array(
    714715                        'post_mime_type' => 'image/jpeg',
    715716                        'menu_order' => rand( 1, 100 )
    716717                ) );
    717                 $att_ids[3] = $this->factory->attachment->create_object( 'woo3.jpg', $post_id, array(
     718                $att_ids[3] = $this->factory->attachment->create_object( $file, $post_id, array(
    718719                        'post_mime_type' => 'image/jpeg',
    719720                        'menu_order' => rand( 1, 100 )
    720721                ) );
    721                 $att_ids[4] = $this->factory->attachment->create_object( 'woo4.jpg', $post_id, array(
     722                $att_ids[4] = $this->factory->attachment->create_object( $file, $post_id, array(
    722723                        'post_mime_type' => 'image/jpeg',
    723724                        'menu_order' => rand( 1, 100 )
    724725                ) );
    725                 $att_ids[5] = $this->factory->attachment->create_object( 'woo5.jpg', $post_id, array(
     726                $att_ids[5] = $this->factory->attachment->create_object( $file, $post_id, array(
    726727                        'post_mime_type' => 'image/jpeg',
    727728                        'menu_order' => rand( 1, 100 )
Note: See TracChangeset for help on using the changeset viewer.