construct_info_retrieval_error( $request, $response ); } else { $result = json_decode( $response['body'] ); $result = $result->thumbnail_url; } return $result; } // Test cases public static function get_test_cases() { return array( array( 'markup' => '
', 'expected' => 'http://2.media.collegehumor.cvcdn.com/62/99/20502ca0d5b2172421002b52f437dcf8-mitt-romney-style-gangnam-style-parody.jpg', 'expected_hash' => 'ceac16f6ee1fa5d8707e813226060a15', 'name' => __( 'iFrame Embed', 'video-thumbnails' ) ), array( 'markup' => 'http://www.collegehumor.com/video/6830834/mitt-romney-style-gangnam-style-parody', 'expected' => 'http://2.media.collegehumor.cvcdn.com/62/99/20502ca0d5b2172421002b52f437dcf8-mitt-romney-style-gangnam-style-parody.jpg', 'expected_hash' => 'ceac16f6ee1fa5d8707e813226060a15', 'name' => __( 'Video URL', 'video-thumbnails' ) ), ); } } ?>