Changeset 39560 for trunk/tests/phpunit/tests/customize/manager.php
- Timestamp:
- 12/10/2016 06:59:24 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/customize/manager.php
r39506 r39560 2581 2581 $this->assertEquals( $panels_sorted, array_keys( $result ) ); 2582 2582 } 2583 2584 /** 2585 * Verify sanitization of external header video URL will trim the whitespaces in the beginning and end of the URL. 2586 * 2587 * @ticket 39125 2588 */ 2589 function test_sanitize_external_header_video_trim() { 2590 $this->manager->register_controls(); 2591 $setting = $this->manager->get_setting( 'external_header_video' ); 2592 $video_url = 'https://www.youtube.com/watch?v=KiS8rZBeIO0'; 2593 2594 $whitespaces = array( 2595 ' ', // space 2596 "\t", // horizontal tab 2597 "\n", // line feed 2598 "\r", // carriage return, 2599 "\f", // form feed, 2600 "\v", // vertical tab 2601 ); 2602 2603 foreach ( $whitespaces as $whitespace ) { 2604 $sanitized = $setting->sanitize( $whitespace . $video_url . $whitespace ); 2605 $this->assertEquals( $video_url, $sanitized ); 2606 } 2607 } 2583 2608 } 2584 2609
Note: See TracChangeset
for help on using the changeset viewer.