feat: support PHPUnit v9.1 naming for some asserts #9582
Annotations
5 warnings
PHP 8.3 mutation tests:
src/Fixer/PhpUnit/PhpUnitDedicateAssertFixer.php#L413
Escaped Mutant for Mutator "CastString":
--- Original
+++ New
@@ @@
if (false === $replace) {
return;
}
- $tokens[$assertCall['index']] = new Token([T_STRING, (string) $replace]);
+ $tokens[$assertCall['index']] = new Token([T_STRING, $replace]);
$this->removeFunctionCall($tokens, $testDefaultNamespaceTokenIndex, $testIndex, $testOpenIndex, $testCloseIndex);
if (self::$fixMap[$content]['swap_arguments'] ?? false) {
if (2 !== $expectedCount) {
|
PHP 8.3 mutation tests:
src/RuleSet/Sets/PHPUnit100MigrationRiskySet.php#L26
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
{
public function getRules() : array
{
- return ['@PHPUnit91Migration:risky' => true, 'php_unit_data_provider_static' => ['force' => true]];
+ return ['php_unit_data_provider_static' => ['force' => true]];
}
}
|
PHP 8.3 mutation tests:
src/RuleSet/Sets/PHPUnit100MigrationRiskySet.php#L27
Escaped Mutant for Mutator "TrueValue":
--- Original
+++ New
@@ @@
{
public function getRules() : array
{
- return ['@PHPUnit91Migration:risky' => true, 'php_unit_data_provider_static' => ['force' => true]];
+ return ['@PHPUnit91Migration:risky' => false, 'php_unit_data_provider_static' => ['force' => true]];
}
}
|
PHP 8.3 mutation tests:
src/RuleSet/Sets/PHPUnit91MigrationRiskySet.php#L27
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
{
public function getRules() : array
{
- return ['@PHPUnit84Migration:risky' => true, 'php_unit_dedicate_assert' => ['target' => PhpUnitTargetVersion::VERSION_9_1]];
+ return ['php_unit_dedicate_assert' => ['target' => PhpUnitTargetVersion::VERSION_9_1]];
}
}
|
PHP 8.3 mutation tests:
src/RuleSet/Sets/PHPUnit91MigrationRiskySet.php#L28
Escaped Mutant for Mutator "TrueValue":
--- Original
+++ New
@@ @@
{
public function getRules() : array
{
- return ['@PHPUnit84Migration:risky' => true, 'php_unit_dedicate_assert' => ['target' => PhpUnitTargetVersion::VERSION_9_1]];
+ return ['@PHPUnit84Migration:risky' => false, 'php_unit_dedicate_assert' => ['target' => PhpUnitTargetVersion::VERSION_9_1]];
}
}
|