Make WordPress Core

Changeset 36785


Ignore:
Timestamp:
02/29/2016 09:55:41 PM (9 years ago)
Author:
boonebgorges
Message:

Tests: setExpectedDeprecated and setExpectedIncorrectUsage tests should make assertions.

Introduced in [31306].

See #36016.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/includes/helpers.php

    r33425 r36785  
    175175    public function test_setExpectedDeprecated() {
    176176        $this->setExpectedDeprecated( 'Tests_TestHelpers::mock_deprecated' );
    177         $this->mock_deprecated();
     177        $this->assertTrue( $this->mock_deprecated() );
    178178    }
    179179
     
    183183    public function test_setExpectedIncorrectUsage() {
    184184        $this->setExpectedIncorrectUsage( 'Tests_TestHelpers::mock_incorrect_usage' );
    185         $this->mock_incorrect_usage();
     185        $this->assertTrue( $this->mock_incorrect_usage() );
    186186    }
    187187
     
    198198    protected function mock_deprecated() {
    199199        _deprecated_function( __METHOD__, '2.5' );
     200        return true;
    200201    }
    201202
    202203    protected function mock_incorrect_usage() {
    203204        _doing_it_wrong( __METHOD__, __( 'Incorrect usage test' ), '2.5' );
     205        return true;
    204206    }
    205207}
Note: See TracChangeset for help on using the changeset viewer.