Changeset 46645
- Timestamp:
- 11/03/2019 10:47:52 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/pluggable.php
r46641 r46645 5 5 */ 6 6 class Tests_Pluggable extends WP_UnitTestCase { 7 8 /**9 * @dataProvider get_good_status_codes10 *11 * @ticket 4431712 * @param string $location The path or URL to redirect to.13 * @param int $status HTTP response status code to use.14 */15 public function test_wp_redirect_good_status_code( $location, $status ) {16 $this->assertTrue( wp_redirect( $location, $status ) );17 }18 19 public function get_good_status_codes() {20 return [21 // Expected Statuses22 [ '/wp-admin', 301 ],23 [ '/wp-admin', 302 ],24 [ '/wp-admin', 307 ],25 // Outliers that are valid26 [ '/wp-admin', 300 ],27 [ '/wp-admin', 399 ],28 ];29 }30 7 31 8 /**
Note: See TracChangeset
for help on using the changeset viewer.