Skip to content

Commit

Permalink
work around method removed from PHPunit 9
Browse files Browse the repository at this point in the history
  • Loading branch information
pilif committed Dec 16, 2020
1 parent e961400 commit b18ca30
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/TestTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use Eris\Random\RandomRange;
use Eris\Random\RandSource;
use Eris\Shrinker\ShrinkerFactory;
use PHPUnit\Util\Test as TestUtil;

trait TestTrait
{
Expand Down Expand Up @@ -51,7 +52,10 @@ function ($listener) {
return !($listener instanceof MinimumEvaluations);
}
);
$tags = $this->getAnnotations();//from TestCase of PHPunit
$tags = TestUtil::parseTestMethodAnnotations(
static::class,
$this->getName(false)
);
$this->withRand($this->getAnnotationValue($tags, 'eris-method', 'rand', 'strval'));
$this->iterations = $this->getAnnotationValue($tags, 'eris-repeat', 100, 'intval');
$this->shrinkingTimeLimit = $this->getAnnotationValue($tags, 'eris-shrink', null, 'intval');
Expand Down

0 comments on commit b18ca30

Please sign in to comment.