Make WordPress Core


Ignore:
Timestamp:
06/23/2022 08:27:34 PM (2 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/redirect.php

    r52010 r53562  
    2323     * @param string $location The path or URL to redirect to.
    2424     * @param int    $status   HTTP response status code to use.
     25     *
     26     * @covers ::wp_redirect
    2527     */
    2628    public function test_wp_redirect_bad_status_code( $location, $status ) {
     
    4244    }
    4345
     46    /**
     47     * @covers ::wp_sanitize_redirect
     48     */
    4449    public function test_wp_sanitize_redirect() {
    4550        $this->assertSame( 'http://example.com/watchthelinefeedgo', wp_sanitize_redirect( 'http://example.com/watchthelinefeed%0Ago' ) );
     
    6065    /**
    6166     * @ticket 36998
     67     *
     68     * @covers ::wp_sanitize_redirect
    6269     */
    6370    public function test_wp_sanitize_redirect_should_encode_spaces() {
     
    6875    /**
    6976     * @dataProvider valid_url_provider
     77     *
     78     * @covers ::wp_validate_redirect
    7079     */
    7180    public function test_wp_validate_redirect_valid_url( $url, $expected ) {
     
    7584    /**
    7685     * @dataProvider invalid_url_provider
     86     *
     87     * @covers ::wp_validate_redirect
    7788     */
    7889    public function test_wp_validate_redirect_invalid_url( $url ) {
     
    167178     * @ticket 47980
    168179     * @dataProvider relative_url_provider
     180     *
     181     * @covers ::wp_validate_redirect
    169182     */
    170183    public function test_wp_validate_redirect_relative_url( $current_uri, $url, $expected ) {
Note: See TracChangeset for help on using the changeset viewer.