random() public static method

public static random ( $min, $max = null )
Beispiel #1
0
 /**
  * @test
  */
 public function shouldGenerateRandomNumberInRange()
 {
     for ($i = 0; $i < 100; ++$i) {
         //given
         $function = Functions::random(3, 7);
         //when
         $result = $function();
         //then
         $this->assertGreaterThanOrEqual(3, $result);
         $this->assertLessThanOrEqual(7, $result);
     }
 }