Ticket #28486: 28486.3.diff
File 28486.3.diff, 1.3 KB (added by , 10 years ago) |
---|
-
tests/phpunit/includes/testcase.php
245 245 } 246 246 } 247 247 248 function setExpectedDeprecated( $deprecated_element ) { 249 array_push( $this->expected_deprecated, $deprecated_element ); 250 } 251 252 function setExpectedIncorrectUsage( $doing_it_wrong ) { 253 array_push( $this->expected_doing_it_wrong, $doing_it_wrong ); 254 } 255 248 256 function deprecated_function_run( $function ) { 249 257 if ( ! in_array( $function, $this->caught_deprecated ) ) 250 258 $this->caught_deprecated[] = $function; -
tests/phpunit/tests/includes/helpers.php
168 168 169 169 $this->assertFalse( isset( $stati['foo'] ) ); 170 170 } 171 172 public function test_setExpectedDeprecated() { 173 _deprecated_function( __FUNCTION__, '2.5' ); 174 $this->setExpectedDeprecated( 'test_setExpectedDeprecated' ); 175 } 176 177 public function test_setExpectedIncorrectUsage() { 178 _doing_it_wrong( __FUNCTION__, __( 'Incorrect usage test' ), '2.5' ); 179 $this->setExpectedIncorrectUsage( 'test_setExpectedIncorrectUsage' ); 180 } 171 181 }