Changeset 52010 for trunk/tests/phpunit/tests/formatting/slashit.php
- Timestamp:
- 11/04/2021 03:22:47 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/formatting/slashit.php
r51623 r52010 5 5 */ 6 6 class Tests_Formatting_Slashit extends WP_UnitTestCase { 7 function test_backslashes_middle_numbers() {7 public function test_backslashes_middle_numbers() { 8 8 $this->assertSame( "\\a-!9\\a943\\b\\c", backslashit( 'a-!9a943bc' ) ); 9 9 } 10 10 11 function test_backslashes_alphas() {11 public function test_backslashes_alphas() { 12 12 $this->assertSame( "\\a943\\b\\c", backslashit( 'a943bc' ) ); 13 13 } 14 14 15 function test_double_backslashes_leading_numbers() {15 public function test_double_backslashes_leading_numbers() { 16 16 $this->assertSame( '\\\\95', backslashit( '95' ) ); 17 17 } 18 18 19 function test_removes_trailing_slashes() {19 public function test_removes_trailing_slashes() { 20 20 $this->assertSame( 'a', untrailingslashit( 'a/' ) ); 21 21 $this->assertSame( 'a', untrailingslashit( 'a////' ) ); … … 25 25 * @ticket 22267 26 26 */ 27 function test_removes_trailing_backslashes() {27 public function test_removes_trailing_backslashes() { 28 28 $this->assertSame( 'a', untrailingslashit( 'a\\' ) ); 29 29 $this->assertSame( 'a', untrailingslashit( 'a\\\\\\\\' ) ); … … 33 33 * @ticket 22267 34 34 */ 35 function test_removes_trailing_mixed_slashes() {35 public function test_removes_trailing_mixed_slashes() { 36 36 $this->assertSame( 'a', untrailingslashit( 'a/\\' ) ); 37 37 $this->assertSame( 'a', untrailingslashit( 'a\\/\\///\\\\//' ) ); 38 38 } 39 39 40 function test_adds_trailing_slash() {40 public function test_adds_trailing_slash() { 41 41 $this->assertSame( 'a/', trailingslashit( 'a' ) ); 42 42 } 43 43 44 function test_does_not_add_trailing_slash_if_one_exists() {44 public function test_does_not_add_trailing_slash_if_one_exists() { 45 45 $this->assertSame( 'a/', trailingslashit( 'a/' ) ); 46 46 } … … 49 49 * @ticket 22267 50 50 */ 51 function test_converts_trailing_backslash_to_slash_if_one_exists() {51 public function test_converts_trailing_backslash_to_slash_if_one_exists() { 52 52 $this->assertSame( 'a/', trailingslashit( 'a\\' ) ); 53 53 }
Note: See TracChangeset
for help on using the changeset viewer.