Changeset 31574 for trunk/tests/phpunit/tests/media.php
- Timestamp:
- 02/27/2015 04:11:00 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/media.php
r31239 r31574 379 379 CONTENT; 380 380 381 $types = array( ' audio', 'video', 'object', 'embed', 'iframe' );381 $types = array( 'object', 'embed', 'iframe', 'audio', 'video' ); 382 382 $contents = array_values( compact( $types ) ); 383 383 … … 399 399 $matches = get_media_embedded_in_content( $content, $types ); 400 400 $this->assertEquals( $contents, $matches ); 401 } 402 403 function test_get_media_embedded_in_content_order() { 404 $audio =<<<AUDIO 405 <audio preload="none"> 406 <source /> 407 </audio> 408 AUDIO; 409 $video =<<<VIDEO 410 <video preload="none"> 411 <source /> 412 </video> 413 VIDEO; 414 $content = $audio . $video; 415 416 $matches1 = get_media_embedded_in_content( $content, array( 'audio', 'video' ) ); 417 $this->assertEquals( array( $audio, $video ), $matches1 ); 418 419 $reversed = $video . $audio; 420 $matches2 = get_media_embedded_in_content( $reversed, array( 'audio', 'video' ) ); 421 $this->assertEquals( array( $video, $audio ), $matches2 ); 401 422 } 402 423
Note: See TracChangeset
for help on using the changeset viewer.