diff --git tests/phpunit/tests/image/functions.php tests/phpunit/tests/image/functions.php
index 27bdbf3181..a2a509b74d 100644
|
|
class Tests_Image_Functions extends WP_UnitTestCase { |
487 | 487 | ) ); |
488 | 488 | |
489 | 489 | $metadata = wp_generate_attachment_metadata( $attachment_id, $pdf_path ); |
| 490 | |
| 491 | // Make sure we have valid data to run the actual test. |
| 492 | $failure_message = 'Could not generate proper PDF attachment metadata to run test.'; |
| 493 | $this->assertInternalType( 'array', $metadata, $failure_message ); |
| 494 | $this->assertArrayHasKey( 'sizes', $metadata, $failure_message ); |
| 495 | $this->assertArrayHasKey( 'full', $metadata['sizes'], $failure_message ); |
| 496 | $this->assertArrayHasKey( 'file', $metadata['full'], $failure_message ); |
| 497 | |
490 | 498 | $preview_path = '/tmp/' . $metadata['sizes']['full']['file']; |
491 | 499 | |
492 | 500 | // PDF preview didn't overwrite PDF. |