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' => 'http://rutube.ru/video/ca8607cd4f7ef28516e043dde0068564/', 'expected' => 'http://pic.rutube.ru/video/3a/c8/3ac8c1ded16501002d20fa3ba3ed3d61.jpg', 'expected_hash' => '85ad79c118ee82c7c2a756ba29a96354', 'name' => __( 'Video URL', 'video-thumbnails' ) ), array( 'markup' => '', 'expected' => 'http://pic.rutube.ru/video/3a/c8/3ac8c1ded16501002d20fa3ba3ed3d61.jpg', 'expected_hash' => '85ad79c118ee82c7c2a756ba29a96354', 'name' => __( 'iFrame Embed', 'video-thumbnails' ) ), ); } } ?>