Changeset 53852
- Timestamp:
- 08/07/2022 02:32:55 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/media/getPostGalleries.php
r52984 r53852 5 5 * @covers ::get_post_galleries 6 6 */ 7 class Tests_Functions_getPostGalleries extends WP_UnitTestCase { 8 9 public function set_up() { 10 parent::set_up(); 11 $this->img_meta = array( 12 'width' => 100, 13 'height' => 100, 14 'sizes' => '', 15 ); 16 } 7 class Tests_Media_GetPostGalleries extends WP_UnitTestCase { 8 9 const IMG_META = array( 10 'width' => 100, 11 'height' => 100, 12 'sizes' => '', 13 ); 17 14 18 15 /** … … 570 567 ) 571 568 ); 572 $metadata = array_merge( array( 'file' => "image$i.jpg" ), $this->img_meta);569 $metadata = array_merge( array( 'file' => "image$i.jpg" ), self::IMG_META ); 573 570 wp_update_attachment_metadata( $attachment_id, $metadata ); 574 571 $ids[] = $attachment_id; … … 659 656 ) 660 657 ); 661 $metadata = array_merge( array( 'file' => 'image1.jpg' ), $this->img_meta);658 $metadata = array_merge( array( 'file' => 'image1.jpg' ), self::IMG_META ); 662 659 $url = 'http://' . WP_TESTS_DOMAIN . '/wp-content/uploads/' . 'image1.jpg'; 663 660 $global_post_id = $this->factory->post->create( … … 839 836 ) 840 837 ); 841 $metadata = array_merge( array( 'file' => "image$i.jpg" ), $this->img_meta);838 $metadata = array_merge( array( 'file' => "image$i.jpg" ), self::IMG_META ); 842 839 wp_update_attachment_metadata( $attachment_id, $metadata ); 843 840 $ids[] = $attachment_id; … … 903 900 ) 904 901 ); 905 $metadata = array_merge( array( 'file' => "image$i.jpg" ), $this->img_meta);902 $metadata = array_merge( array( 'file' => "image$i.jpg" ), self::IMG_META ); 906 903 wp_update_attachment_metadata( $attachment_id, $metadata ); 907 904 $ids[] = $attachment_id;
Note: See TracChangeset
for help on using the changeset viewer.