Changeset 47329 for branches/3.9/tests/phpunit/tests/image/resize_gd.php
- Timestamp:
- 02/20/2020 05:04:42 PM (5 years ago)
- Location:
- branches/3.9
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.9
-
branches/3.9/tests/phpunit/tests/image/resize_gd.php
r25002 r47329 5 5 * @group media 6 6 * @group upload 7 * @group resize 7 8 */ 9 require_once( dirname( __FILE__ ) . '/resize.php' ); 10 8 11 class Test_Image_Resize_GD extends WP_Tests_Image_Resize_UnitTestCase { 9 12 … … 13 16 */ 14 17 public $editor_engine = 'WP_Image_Editor_GD'; 18 19 public function setUp() { 20 require_once( ABSPATH . WPINC . '/class-wp-image-editor.php' ); 21 require_once( ABSPATH . WPINC . '/class-wp-image-editor-gd.php' ); 22 23 parent::setUp(); 24 } 25 26 /** 27 * Try resizing a php file (bad image) 28 * @ticket 6821 29 */ 30 public function test_resize_bad_image() { 31 32 $image = $this->resize_helper( DIR_TESTDATA.'/export/crazy-cdata.xml', 25, 25 ); 33 $this->assertInstanceOf( 'WP_Error', $image ); 34 $this->assertEquals( 'invalid_image', $image->get_error_code() ); 35 } 36 15 37 }
Note: See TracChangeset
for help on using the changeset viewer.