Changeset 9410 for trunk/tests/phpunit/testcases/core/functions.php
- Timestamp:
- 01/29/2015 03:36:16 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/core/functions.php
r9295 r9410 393 393 394 394 $this->assertEquals( $expected, bp_alpha_sort_by_key( $items, 'name' ) ); 395 } 396 397 /** 398 * @group bp_sanitize_pagination_arg 399 */ 400 public function test_bp_sanitize_pagination_arg_zero() { 401 $request = $_REQUEST; 402 $arg = 'bp_pagination_test'; 403 $page = 1; 404 $_REQUEST[ $arg ] = '0'; 405 $value = bp_sanitize_pagination_arg( $arg, $page ); 406 407 $this->assertEquals( $value, $page ); 408 409 $_REQUEST = $request; 410 } 411 412 /** 413 * @group bp_sanitize_pagination_arg 414 */ 415 public function test_bp_sanitize_pagination_arg_negative() { 416 $request = $_REQUEST; 417 $arg = 'bp_pagination_test'; 418 $page = 25; 419 $_REQUEST[ $arg ] = '-25'; 420 $value = bp_sanitize_pagination_arg( $arg, $page ); 421 422 $this->assertEquals( $value, $page ); 423 424 $_REQUEST = $request; 395 425 } 396 426
Note: See TracChangeset
for help on using the changeset viewer.