From a45a4f98efb60b89ab00521eea0374844d747a54 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 6 Jul 2020 16:13:26 +0000 Subject: [PATCH] Tests: Add some assertions to PDF tests for better debugging. Props enrico.sorcinelli. See #50573. git-svn-id: https://develop.svn.wordpress.org/trunk@48338 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/image/functions.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/phpunit/tests/image/functions.php b/tests/phpunit/tests/image/functions.php index 444d730fdc..cbacec809e 100644 --- a/tests/phpunit/tests/image/functions.php +++ b/tests/phpunit/tests/image/functions.php @@ -423,6 +423,8 @@ class Tests_Image_Functions extends WP_UnitTestCase { $test_file = '/tmp/wordpress-gsoc-flyer.pdf'; copy( $orig_file, $test_file ); + $this->assertNotWPError( wp_get_image_editor( $test_file ) ); + $attachment_id = $this->factory->attachment->create_object( $test_file, 0, @@ -488,6 +490,8 @@ class Tests_Image_Functions extends WP_UnitTestCase { $test_file = get_temp_dir() . 'wordpress-gsoc-flyer.pdf'; copy( $orig_file, $test_file ); + $this->assertNotWPError( wp_get_image_editor( $test_file ) ); + $attachment_id = $this->factory->attachment->create_object( $test_file, 0, @@ -548,6 +552,8 @@ class Tests_Image_Functions extends WP_UnitTestCase { $test_file = '/tmp/wordpress-gsoc-flyer.pdf'; copy( $orig_file, $test_file ); + $this->assertNotWPError( wp_get_image_editor( $test_file ) ); + $attachment_id = $this->factory->attachment->create_object( $test_file, 0, @@ -608,6 +614,8 @@ class Tests_Image_Functions extends WP_UnitTestCase { $pdf_path = '/tmp/test.pdf'; copy( DIR_TESTDATA . '/images/wordpress-gsoc-flyer.pdf', $pdf_path ); + $this->assertNotWPError( wp_get_image_editor( $pdf_path ) ); + $attachment_id = $this->factory->attachment->create_object( $pdf_path, 0,