Changeset 64059
- Timestamp:
- 10/02/2026 05:16:44 PM (8 weeks ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/media.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/media.php
r64042 r64059 1535 1535 $h = ceil( ( $height * $width ) / $width ); 1536 1536 1537 // wp_video_shortcode() numbers every call in the process, so record this call's number. 1538 $instance = 0; 1539 add_filter( 1540 'wp_video_shortcode_override', 1541 static function ( $html, $attr, $content, $id ) use ( &$instance ) { 1542 $instance = $id; 1543 return $html; 1544 }, 1545 10, 1546 4 1547 ); 1548 1537 1549 $content = apply_filters( 'the_content', $video ); 1538 1550 1539 1551 $expected = '<div style="width: ' . $width . 'px;" class="wp-video">' . 1540 '<video class="wp-video-shortcode" id="video-' . $post_id . '- 1" width="' . $width . '" height="' . $h . '" preload="metadata" controls="controls">' .1541 '<source type="video/mp4" src="http://domain.tld/wp-content/uploads/2013/12/xyz.mp4?_= 1" />' .1552 '<video class="wp-video-shortcode" id="video-' . $post_id . '-' . $instance . '" width="' . $width . '" height="' . $h . '" preload="metadata" controls="controls">' . 1553 '<source type="video/mp4" src="http://domain.tld/wp-content/uploads/2013/12/xyz.mp4?_=' . $instance . '" />' . 1542 1554 '<!-- WebM/VP8 for Firefox4, Opera, and Chrome --><source type="video/webm" src="myvideo.webm" />' . 1543 1555 '<!-- Ogg/Vorbis for older Firefox and Opera versions --><source type="video/ogg" src="myvideo.ogv" />' .
Note:
See TracChangeset
for help on using the changeset viewer.