Changeset 42343 for trunk/tests/phpunit/tests/formatting/SanitizeTitle.php
- Timestamp:
- 11/30/2017 11:09:33 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/formatting/SanitizeTitle.php
r25002 r42343 6 6 class Tests_Formatting_SanitizeTitle extends WP_UnitTestCase { 7 7 function test_strips_html() { 8 $input = "Captain <strong>Awesome</strong>";9 $expected = "captain-awesome";10 $this->assertEquals( $expected, sanitize_title($input));8 $input = 'Captain <strong>Awesome</strong>'; 9 $expected = 'captain-awesome'; 10 $this->assertEquals( $expected, sanitize_title( $input ) ); 11 11 } 12 12 13 13 function test_titles_sanitized_to_nothing_are_replaced_with_optional_fallback() { 14 $input = "<strong></strong>";15 $fallback = "Captain Awesome";16 $this->assertEquals( $fallback, sanitize_title($input, $fallback));14 $input = '<strong></strong>'; 15 $fallback = 'Captain Awesome'; 16 $this->assertEquals( $fallback, sanitize_title( $input, $fallback ) ); 17 17 } 18 18 }
Note: See TracChangeset
for help on using the changeset viewer.