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
This commit is contained in:
Sergey Biryukov 2020-07-06 16:13:26 +00:00
parent 9f8a9a3239
commit a45a4f98ef

View File

@ -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,