Skip to content

Conversation

@peterwilsoncc
Copy link
Contributor

@peterwilsoncc peterwilsoncc force-pushed the 52826-wp-getimagesize branch from 3471626 to 9b9d1f4 Compare March 25, 2021 03:52

public function test_get_jpeg_with_meta_data_via_stream() {
// wp_read_image_metadata gets the meta data via wp_getimagesize().
$out = wp_read_image_metadata( 'wptestmediawpgetimagesize://Tests_Media_WpGetimagesize/exif.jpg' );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@peterwilsoncc The failure here is due to WP_Test_Stream not supporting seeking. Discovered by adding this into the test:

var_dump( getimagesize( 'wptestmediawpgetimagesize://Tests_Media_WpGetimagesize/exif.jpg' ) );

which returns the following:

getimagesize(): stream does not support seeking

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much. I'll put it in without tests and reach out to a few plugin developers to request manual testing.

If the test class can be set up to support seeking then the tests can be added as part of that.

Thanks again boss!

@peterwilsoncc
Copy link
Contributor Author

@peterwilsoncc peterwilsoncc deleted the 52826-wp-getimagesize branch April 19, 2021 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants