Make WordPress Core


Ignore:
Timestamp:
06/23/2022 08:27:34 PM (4 years ago)
Author:
azaozz
Message:

Build/Test Tools, Formatting group:

  • Add and update @covers tags.
  • Add and improve docs and inline comments.

Props pbeane, hellofromTonya, antonvlasenko, ironprogrammer, SergeyBiryukov, costdev.
See #39265.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/formatting/slashit.php

    r52010 r53562  
    55 */
    66class Tests_Formatting_Slashit extends WP_UnitTestCase {
     7
     8    /**
     9     * @covers ::backslashit
     10     */
    711    public function test_backslashes_middle_numbers() {
    812        $this->assertSame( "\\a-!9\\a943\\b\\c", backslashit( 'a-!9a943bc' ) );
    913    }
    1014
     15    /**
     16     * @covers ::backslashit
     17     */
    1118    public function test_backslashes_alphas() {
    1219        $this->assertSame( "\\a943\\b\\c", backslashit( 'a943bc' ) );
    1320    }
    1421
     22    /**
     23     * @covers ::backslashit
     24     */
    1525    public function test_double_backslashes_leading_numbers() {
    1626        $this->assertSame( '\\\\95', backslashit( '95' ) );
    1727    }
    1828
     29    /**
     30     * @covers ::untrailingslashit
     31     */
    1932    public function test_removes_trailing_slashes() {
    2033        $this->assertSame( 'a', untrailingslashit( 'a/' ) );
     
    2437    /**
    2538     * @ticket 22267
     39     *
     40     * @covers ::untrailingslashit
    2641     */
    2742    public function test_removes_trailing_backslashes() {
     
    3247    /**
    3348     * @ticket 22267
     49     *
     50     * @covers ::untrailingslashit
    3451     */
    3552    public function test_removes_trailing_mixed_slashes() {
     
    3855    }
    3956
     57    /**
     58     * @covers ::trailingslashit
     59     */
    4060    public function test_adds_trailing_slash() {
    4161        $this->assertSame( 'a/', trailingslashit( 'a' ) );
    4262    }
    4363
     64    /**
     65     * @covers ::trailingslashit
     66     */
    4467    public function test_does_not_add_trailing_slash_if_one_exists() {
    4568        $this->assertSame( 'a/', trailingslashit( 'a/' ) );
     
    4871    /**
    4972     * @ticket 22267
     73     *
     74     * @covers ::trailingslashit
    5075     */
    5176    public function test_converts_trailing_backslash_to_slash_if_one_exists() {
Note: See TracChangeset for help on using the changeset viewer.