Changeset 51225
- Timestamp:
- 06/24/2021 06:51:54 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/functions/wpToKebabCase.php
r51198 r51225 12 12 13 13 public function test_wp_to_kebab_case() { 14 $this->assert Equals( 'white', _wp_to_kebab_case( 'white' ) );15 $this->assert Equals( 'white-black', _wp_to_kebab_case( 'white+black' ) );16 $this->assert Equals( 'white-black', _wp_to_kebab_case( 'white:black' ) );17 $this->assert Equals( 'white-black', _wp_to_kebab_case( 'white*black' ) );18 $this->assert Equals( 'white-black', _wp_to_kebab_case( 'white.black' ) );19 $this->assert Equals( 'white-black', _wp_to_kebab_case( 'white black' ) );20 $this->assert Equals( 'white-black', _wp_to_kebab_case( 'white black' ) );21 $this->assert Equals( 'white-to-black', _wp_to_kebab_case( 'white-to-black' ) );22 $this->assert Equals( 'white-2-white', _wp_to_kebab_case( 'white2white' ) );23 $this->assert Equals( 'white-2nd', _wp_to_kebab_case( 'white2nd' ) );24 $this->assert Equals( 'white-2-ndcolor', _wp_to_kebab_case( 'white2ndcolor' ) );25 $this->assert Equals( 'white-2nd-color', _wp_to_kebab_case( 'white2ndColor' ) );26 $this->assert Equals( 'white-2nd-color', _wp_to_kebab_case( 'white2nd_color' ) );27 $this->assert Equals( 'white-23-color', _wp_to_kebab_case( 'white23color' ) );28 $this->assert Equals( 'white-23', _wp_to_kebab_case( 'white23' ) );29 $this->assert Equals( '23-color', _wp_to_kebab_case( '23color' ) );30 $this->assert Equals( 'white-4th', _wp_to_kebab_case( 'white4th' ) );31 $this->assert Equals( 'font-2-xl', _wp_to_kebab_case( 'font2xl' ) );32 $this->assert Equals( 'white-to-white', _wp_to_kebab_case( 'whiteToWhite' ) );33 $this->assert Equals( 'white-t-owhite', _wp_to_kebab_case( 'whiteTOwhite' ) );34 $this->assert Equals( 'whit-eto-white', _wp_to_kebab_case( 'WHITEtoWHITE' ) );35 $this->assert Equals( '42', _wp_to_kebab_case( 42 ) );36 $this->assert Equals( 'ive-done', _wp_to_kebab_case( "i've done" ) );37 $this->assert Equals( 'ffffff', _wp_to_kebab_case( '#ffffff' ) );38 $this->assert Equals( 'ffffff', _wp_to_kebab_case( '$ffffff' ) );14 $this->assertSame( 'white', _wp_to_kebab_case( 'white' ) ); 15 $this->assertSame( 'white-black', _wp_to_kebab_case( 'white+black' ) ); 16 $this->assertSame( 'white-black', _wp_to_kebab_case( 'white:black' ) ); 17 $this->assertSame( 'white-black', _wp_to_kebab_case( 'white*black' ) ); 18 $this->assertSame( 'white-black', _wp_to_kebab_case( 'white.black' ) ); 19 $this->assertSame( 'white-black', _wp_to_kebab_case( 'white black' ) ); 20 $this->assertSame( 'white-black', _wp_to_kebab_case( 'white black' ) ); 21 $this->assertSame( 'white-to-black', _wp_to_kebab_case( 'white-to-black' ) ); 22 $this->assertSame( 'white-2-white', _wp_to_kebab_case( 'white2white' ) ); 23 $this->assertSame( 'white-2nd', _wp_to_kebab_case( 'white2nd' ) ); 24 $this->assertSame( 'white-2-ndcolor', _wp_to_kebab_case( 'white2ndcolor' ) ); 25 $this->assertSame( 'white-2nd-color', _wp_to_kebab_case( 'white2ndColor' ) ); 26 $this->assertSame( 'white-2nd-color', _wp_to_kebab_case( 'white2nd_color' ) ); 27 $this->assertSame( 'white-23-color', _wp_to_kebab_case( 'white23color' ) ); 28 $this->assertSame( 'white-23', _wp_to_kebab_case( 'white23' ) ); 29 $this->assertSame( '23-color', _wp_to_kebab_case( '23color' ) ); 30 $this->assertSame( 'white-4th', _wp_to_kebab_case( 'white4th' ) ); 31 $this->assertSame( 'font-2-xl', _wp_to_kebab_case( 'font2xl' ) ); 32 $this->assertSame( 'white-to-white', _wp_to_kebab_case( 'whiteToWhite' ) ); 33 $this->assertSame( 'white-t-owhite', _wp_to_kebab_case( 'whiteTOwhite' ) ); 34 $this->assertSame( 'whit-eto-white', _wp_to_kebab_case( 'WHITEtoWHITE' ) ); 35 $this->assertSame( '42', _wp_to_kebab_case( 42 ) ); 36 $this->assertSame( 'ive-done', _wp_to_kebab_case( "i've done" ) ); 37 $this->assertSame( 'ffffff', _wp_to_kebab_case( '#ffffff' ) ); 38 $this->assertSame( 'ffffff', _wp_to_kebab_case( '$ffffff' ) ); 39 39 } 40 40 }
Note: See TracChangeset
for help on using the changeset viewer.