Refactor PHPUnitVersionDetector to ease different major version checks #466
Annotations
3 errors and 9 warnings
|
Mutation Testing (8.4, ubuntu-latest)
Process completed with exit code 1.
|
|
Mutation Testing (8.2, ubuntu-latest)
Process completed with exit code 1.
|
|
Mutation Testing (8.3, ubuntu-latest)
Process completed with exit code 1.
|
|
Mutation Testing (8.4, ubuntu-latest):
src/Rules/PHPUnit/DataProviderHelper.php#L161
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
if (!$dataProviderMethodReflection->isPublic()) {
$errors[] = RuleErrorBuilder::message(sprintf('@dataProvider %s related method must be public.', $dataProviderValue))->line($lineNumber)->identifier('phpunit.dataProviderPublic')->build();
}
- if ($deprecationRulesInstalled && $this->PHPUnitVersion->requiresStaticDataProviders()->yes() && !$dataProviderMethodReflection->isStatic()) {
+ if ($deprecationRulesInstalled && !$this->PHPUnitVersion->requiresStaticDataProviders()->no() && !$dataProviderMethodReflection->isStatic()) {
$errorBuilder = RuleErrorBuilder::message(sprintf('@dataProvider %s related method must be static in PHPUnit 10 and newer.', $dataProviderValue))->line($lineNumber)->identifier('phpunit.dataProviderStatic');
$dataProviderMethodReflectionDeclaringClass = $dataProviderMethodReflection->getDeclaringClass();
if ($dataProviderMethodReflectionDeclaringClass->getFileName() !== null) {
|
|
Mutation Testing (8.4, ubuntu-latest):
src/Rules/PHPUnit/DataProviderHelper.php#L68
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
public function getDataProviderMethods(Scope $scope, $testMethod, ClassReflection $classReflection): iterable
{
yield from $this->yieldDataProviderAnnotations($testMethod, $scope, $classReflection);
- if (!$this->PHPUnitVersion->supportsDataProviderAttribute()->yes()) {
+ if ($this->PHPUnitVersion->supportsDataProviderAttribute()->no()) {
return;
}
yield from $this->yieldDataProviderAttributes($testMethod, $classReflection);
|
|
Mutation Testing (8.4, ubuntu-latest)
Unexpected input(s) 'extensions', valid inputs are ['php-version', 'php-extensions']
|
|
Mutation Testing (8.2, ubuntu-latest):
src/Rules/PHPUnit/DataProviderHelper.php#L161
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
if (!$dataProviderMethodReflection->isPublic()) {
$errors[] = RuleErrorBuilder::message(sprintf('@dataProvider %s related method must be public.', $dataProviderValue))->line($lineNumber)->identifier('phpunit.dataProviderPublic')->build();
}
- if ($deprecationRulesInstalled && $this->PHPUnitVersion->requiresStaticDataProviders()->yes() && !$dataProviderMethodReflection->isStatic()) {
+ if ($deprecationRulesInstalled && !$this->PHPUnitVersion->requiresStaticDataProviders()->no() && !$dataProviderMethodReflection->isStatic()) {
$errorBuilder = RuleErrorBuilder::message(sprintf('@dataProvider %s related method must be static in PHPUnit 10 and newer.', $dataProviderValue))->line($lineNumber)->identifier('phpunit.dataProviderStatic');
$dataProviderMethodReflectionDeclaringClass = $dataProviderMethodReflection->getDeclaringClass();
if ($dataProviderMethodReflectionDeclaringClass->getFileName() !== null) {
|
|
Mutation Testing (8.2, ubuntu-latest):
src/Rules/PHPUnit/DataProviderHelper.php#L68
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
public function getDataProviderMethods(Scope $scope, $testMethod, ClassReflection $classReflection): iterable
{
yield from $this->yieldDataProviderAnnotations($testMethod, $scope, $classReflection);
- if (!$this->PHPUnitVersion->supportsDataProviderAttribute()->yes()) {
+ if ($this->PHPUnitVersion->supportsDataProviderAttribute()->no()) {
return;
}
yield from $this->yieldDataProviderAttributes($testMethod, $classReflection);
|
|
Mutation Testing (8.2, ubuntu-latest)
Unexpected input(s) 'extensions', valid inputs are ['php-version', 'php-extensions']
|
|
Mutation Testing (8.3, ubuntu-latest):
src/Rules/PHPUnit/DataProviderHelper.php#L161
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
if (!$dataProviderMethodReflection->isPublic()) {
$errors[] = RuleErrorBuilder::message(sprintf('@dataProvider %s related method must be public.', $dataProviderValue))->line($lineNumber)->identifier('phpunit.dataProviderPublic')->build();
}
- if ($deprecationRulesInstalled && $this->PHPUnitVersion->requiresStaticDataProviders()->yes() && !$dataProviderMethodReflection->isStatic()) {
+ if ($deprecationRulesInstalled && !$this->PHPUnitVersion->requiresStaticDataProviders()->no() && !$dataProviderMethodReflection->isStatic()) {
$errorBuilder = RuleErrorBuilder::message(sprintf('@dataProvider %s related method must be static in PHPUnit 10 and newer.', $dataProviderValue))->line($lineNumber)->identifier('phpunit.dataProviderStatic');
$dataProviderMethodReflectionDeclaringClass = $dataProviderMethodReflection->getDeclaringClass();
if ($dataProviderMethodReflectionDeclaringClass->getFileName() !== null) {
|
|
Mutation Testing (8.3, ubuntu-latest):
src/Rules/PHPUnit/DataProviderHelper.php#L68
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
public function getDataProviderMethods(Scope $scope, $testMethod, ClassReflection $classReflection): iterable
{
yield from $this->yieldDataProviderAnnotations($testMethod, $scope, $classReflection);
- if (!$this->PHPUnitVersion->supportsDataProviderAttribute()->yes()) {
+ if ($this->PHPUnitVersion->supportsDataProviderAttribute()->no()) {
return;
}
yield from $this->yieldDataProviderAttributes($testMethod, $classReflection);
|
|
Mutation Testing (8.3, ubuntu-latest)
Unexpected input(s) 'extensions', valid inputs are ['php-version', 'php-extensions']
|