Changeset 53479
- Timestamp:
- 06/08/2022 01:17:27 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/pluggable/wpRand.php
r53478 r53479 8 8 9 9 /** 10 * Tests that wp_rand() returns a positive integer for both positive and negative input.10 * Tests that wp_rand() returns a non-negative integer for both positive and negative input. 11 11 * 12 12 * @ticket 55194 13 * @dataProvider data_wp_rand_should_return_a_ positive_integer13 * @dataProvider data_wp_rand_should_return_a_non_negative_integer 14 14 * 15 15 * @param int $min Lower limit for the generated number. 16 16 * @param int $max Upper limit for the generated number. 17 17 */ 18 public function test_wp_rand_should_return_a_ positive_integer( $min, $max ) {19 $this->assertGreaterThan (18 public function test_wp_rand_should_return_a_non_negative_integer( $min, $max ) { 19 $this->assertGreaterThanOrEqual( 20 20 0, 21 21 wp_rand( $min, $max ), 22 'The value was not greater than 0'22 'The value was not greater than or equal 0' 23 23 ); 24 24 … … 35 35 * @return array 36 36 */ 37 public function data_wp_rand_should_return_a_ positive_integer() {37 public function data_wp_rand_should_return_a_non_negative_integer() { 38 38 return array( 39 39 '1 and 99' => array(
Note: See TracChangeset
for help on using the changeset viewer.