From 2e79483014a26ddd2b0ca40af1882c78697add33 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Fri, 29 Mar 2013 22:54:31 -0400 Subject: [PATCH] CommunityMessagesTest - Relax probability test --- tests/phpunit/CRM/Core/CommunityMessagesTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/phpunit/CRM/Core/CommunityMessagesTest.php b/tests/phpunit/CRM/Core/CommunityMessagesTest.php index 2440e6000b..ab4c2cfad5 100644 --- a/tests/phpunit/CRM/Core/CommunityMessagesTest.php +++ b/tests/phpunit/CRM/Core/CommunityMessagesTest.php @@ -299,7 +299,7 @@ class CRM_Core_CommunityMessagesTest extends CiviUnitTestCase { $this->assertEquals('

Two

', $doc1['messages'][1]['markup']); // randomly pick many times - $trials = 40; + $trials = 80; $freq = array(); // array($message => $count) for ($i = 0; $i < $trials; $i++) { $message = $communityMessages->pick(); @@ -307,8 +307,8 @@ class CRM_Core_CommunityMessagesTest extends CiviUnitTestCase { } // assert the probabilities - $this->assertApproxEquals(0.5, $freq['

One

'] / $trials, 0.2); - $this->assertApproxEquals(0.5, $freq['

Two

'] / $trials, 0.2); + $this->assertApproxEquals(0.5, $freq['

One

'] / $trials, 0.3); + $this->assertApproxEquals(0.5, $freq['

Two

'] / $trials, 0.3); $this->assertEquals($trials, $freq['

One

'] + $freq['

Two

']); } -- 2.25.1