Changeset 46649 for trunk/tests/phpunit/tests/pluggable.php
- Timestamp:
- 11/04/2019 12:57:17 PM (7 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/pluggable.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/pluggable.php
r46645 r46649 5 5 */ 6 6 class Tests_Pluggable extends WP_UnitTestCase { 7 8 /**9 * @expectedException WPDieException10 * @dataProvider get_bad_status_codes11 *12 * @ticket 4431713 * @param string $location The path or URL to redirect to.14 * @param int $status HTTP response status code to use.15 */16 public function test_wp_redirect_bad_status_code( $location, $status ) {17 wp_redirect( $location, $status );18 }19 20 public function get_bad_status_codes() {21 return [22 // Tests for bad arguments23 [ '/wp-admin', 404 ],24 [ '/wp-admin', 410 ],25 [ '/wp-admin', 500 ],26 // Tests for condition.27 [ '/wp-admin', 299 ],28 [ '/wp-admin', 400 ],29 ];30 }31 7 32 8 /**
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)