Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5968886
MinimumEvaluationsTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
MinimumEvaluationsTest.php
View Options
<?php
namespace
Eris\Listener
;
use
LogicException
;
class
MinimumEvaluationsTest
extends
\PHPUnit\Framework\TestCase
{
/**
* @var MinimumEvaluations
*/
private
$listener
;
protected
function
setUp
():
void
{
$this
->
listener
=
MinimumEvaluations
::
ratio
(
0.5
);
}
public
function
testAllowsExecutionsWithHigherThanMinimumRatioToBeGreen
():
void
{
$this
->
assertNull
(
$this
->
listener
->
endPropertyVerification
(
99
,
100
));
}
public
function
testWarnsOfDangerouslyLowEvaluationRatiosAsVeryFewTestsAreBeingPerformed
():
void
{
$this
->
expectExceptionMessage
(
"Evaluation ratio 0.2 is under the threshold 0.5"
);
$this
->
expectException
(
\OutOfBoundsException
::
class
);
$this
->
listener
->
endPropertyVerification
(
20
,
100
);
}
public
function
testIfTheTestIsAlreadyFailingDoesNotCreateNoiseWithItsOwnCheck
():
void
{
$this
->
assertNull
(
$this
->
listener
->
endPropertyVerification
(
10
,
100
,
new
LogicException
(
"One of the cross beams has gone out askew on the treadle"
))
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Oct 3, 13:22 (1 d, 19 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
ec/93/230b209e2c64b4e25dfc37c77a4e
Default Alt Text
MinimumEvaluationsTest.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment