Eris\Generator\FrequencyGeneratorTest::testEqualProbability PHP Méthode

testEqualProbability() public méthode

    public function testEqualProbability()
    {
        $generator = new FrequencyGenerator([[1, 42], [1, 21]]);
        $countOf = $this->distribute($generator);
        $this->assertTrue(abs($countOf[42] - $countOf[21]) < 100, 'Generators have the same frequency but one is chosen more often than the other: ' . var_export($countOf, true));
    }