Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7407332
LimitToTest.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
LimitToTest.php
View Options
<?php
use
Eris\Generators
;
use
Eris\TestTrait
;
class
LimitToTest
extends
\PHPUnit\Framework\TestCase
{
use
TestTrait
;
/**
* @eris-repeat 5
*/
public
function
testNumberOfIterationsCanBeConfigured
()
{
$this
->
forAll
(
Generators
::
int
()
)
->
then
(
function
(
$value
)
{
\Eris\PHPUnitDeprecationHelper
::
assertIsInt
(
$value
);
});
}
/*
* future feature
public function testTimeIntervalToRunForCanBeConfiguredButItNeedsToProduceAtLeastHalfOfTheIterationsByDefault()
{
$this->minimum(10)
->limitTo(new DateInterval("PT2S"))
->forAll(
Generator\int()
)
->then(function($value) {
usleep(100 * 1000);
$this->assertTrue(true);
});
}
*/
public
function
testTimeIntervalToRunForCanBeConfiguredAndAVeryLowNumberOfIterationsCanBeIgnored
()
{
$this
->
minimumEvaluationRatio
(
0
)
->
limitTo
(
new
DateInterval
(
'PT2S'
))
->
forAll
(
Generators
::
int
()
)
->
then
(
function
(
$value
)
{
usleep
(
100
*
1000
);
$this
->
assertTrue
(
true
);
});
}
/**
* @eris-ratio 0
* @eris-duration PT2S
*/
public
function
testTimeIntervalToRunForCanBeConfiguredAndAVeryLowNumberOfIterationsCanBeIgnoredFromAnnotation
()
{
$this
->
forAll
(
Generators
::
int
()
)
->
then
(
function
(
$value
)
{
usleep
(
100
*
1000
);
$this
->
assertTrue
(
true
);
});
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Nov 21, 20:53 (1 d, 13 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
bd/8a/681d8c0e9431d090e138dff3a2aa
Default Alt Text
LimitToTest.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment