Ticket #31362: unexpected-deprecated-demo.diff
File unexpected-deprecated-demo.diff, 798 bytes (added by , 9 years ago) |
---|
-
tests/phpunit/tests/includes/helpers.php
185 185 $this->mock_incorrect_usage(); 186 186 } 187 187 188 public function test_is_true_on_occasion() { 189 add_filter( __CLASS__, '__return_true' ); 190 $this->mock_deprecated(); 191 $this->assertTrue( apply_filters( __CLASS__, true ) ); 192 } 193 194 public function test_is_false_by_default() { 195 $this->assertFalse( apply_filters( __CLASS__, false ) ); 196 } 197 198 public function test_both_reported() { 199 $this->mock_deprecated(); 200 $this->mock_incorrect_usage(); 201 } 202 188 203 protected function mock_deprecated() { 189 204 _deprecated_function( __METHOD__, '2.5' ); 190 205 }