Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4090811
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
use
Eris\Generators
;
class
MinimumEvaluationsTest
extends
\PHPUnit\Framework\TestCase
{
use
Eris\TestTrait
;
public
function
testFailsBecauseOfTheLowEvaluationRatio
()
{
$this
->
forAll
(
Generators
::
choose
(
0
,
100
)
)
->
when
(
function
(
$n
)
{
return
$n
>
90
;
})
->
then
(
function
(
$number
)
{
$this
->
assertTrue
(
$number
*
2
>
90
*
2
);
});
}
public
function
testPassesBecauseOfTheArtificiallyLowMinimumEvaluationRatio
()
{
$this
->
minimumEvaluationRatio
(
0.01
)
->
forAll
(
Generators
::
choose
(
0
,
100
)
)
->
when
(
function
(
$n
)
{
return
$n
>
90
;
})
->
then
(
function
(
$number
)
{
$this
->
assertTrue
(
$number
*
2
>
90
*
2
);
});
}
/**
* @eris-ratio 1
*/
public
function
testPassesBecauseOfTheArtificiallyLowMinimumEvaluationRatioFromAnnotation
()
{
$this
->
forAll
(
Generators
::
choose
(
0
,
100
)
)
->
when
(
function
(
$n
)
{
return
$n
>
90
;
})
->
then
(
function
(
$number
)
{
$this
->
assertTrue
(
$number
*
2
>
90
*
2
);
});
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Aug 18 2026, 11:20 (5 w, 4 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
30/6b/f7ea27ae7708b12171c12fe501e9
Default Alt Text
MinimumEvaluationsTest.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment