Scientist\Experiment::chance PHP Method

chance() public method

Set the execution chance.
public chance ( integer $chance )
$chance integer
    public function chance($chance)
    {
        $this->chance = (int) $chance;
        return $this;
    }

Usage Example

 public function test_that_a_chance_variable_can_be_set()
 {
     $e = new Experiment('test experiment');
     $e->chance(50);
     $this->assertEquals(50, $e->getChance());
 }