diff --git a/tests/PHPStan/Rules/Comparison/StrictComparisonOfDifferentTypesRuleTest.php b/tests/PHPStan/Rules/Comparison/StrictComparisonOfDifferentTypesRuleTest.php index 01157d82e1..558ae9340e 100644 --- a/tests/PHPStan/Rules/Comparison/StrictComparisonOfDifferentTypesRuleTest.php +++ b/tests/PHPStan/Rules/Comparison/StrictComparisonOfDifferentTypesRuleTest.php @@ -277,7 +277,8 @@ public function testStrictComparison(): void [ 'Strict comparison using === between lowercase-string|false and \'AB\' will always evaluate to false.', 1014, - $tipText, + "• 'AB' is not lowercase +• Because the type is coming from a PHPDoc, you can turn off this check by setting treatPhpDocTypesAsCertain: false in your %configurationFile%.", ], [ 'Strict comparison using === between mixed and null will always evaluate to false.', @@ -1098,27 +1099,32 @@ public function testLowercaseString(): void [ "Strict comparison using === between lowercase-string and 'AB' will always evaluate to false.", 10, - 'Because the type is coming from a PHPDoc, you can turn off this check by setting treatPhpDocTypesAsCertain: false in your %configurationFile%.', + "• 'AB' is not lowercase. +• Because the type is coming from a PHPDoc, you can turn off this check by setting treatPhpDocTypesAsCertain: false in your %configurationFile%.", ], [ "Strict comparison using === between 'AB' and lowercase-string will always evaluate to false.", 11, - 'Because the type is coming from a PHPDoc, you can turn off this check by setting treatPhpDocTypesAsCertain: false in your %configurationFile%.', + "• 'AB' is not lowercase. +• Because the type is coming from a PHPDoc, you can turn off this check by setting treatPhpDocTypesAsCertain: false in your %configurationFile%.", ], [ "Strict comparison using !== between 'AB' and lowercase-string will always evaluate to true.", 12, - 'Because the type is coming from a PHPDoc, you can turn off this check by setting treatPhpDocTypesAsCertain: false in your %configurationFile%.', + "• 'AB' is not lowercase. +• Because the type is coming from a PHPDoc, you can turn off this check by setting treatPhpDocTypesAsCertain: false in your %configurationFile%.", ], [ "Strict comparison using === between lowercase-string and 'aBc' will always evaluate to false.", 15, - 'Because the type is coming from a PHPDoc, you can turn off this check by setting treatPhpDocTypesAsCertain: false in your %configurationFile%.', + "• 'aBc' is not lowercase. +• Because the type is coming from a PHPDoc, you can turn off this check by setting treatPhpDocTypesAsCertain: false in your %configurationFile%.", ], [ "Strict comparison using !== between lowercase-string and 'aBc' will always evaluate to true.", 16, - 'Because the type is coming from a PHPDoc, you can turn off this check by setting treatPhpDocTypesAsCertain: false in your %configurationFile%.', + "• 'aBc' is not lowercase. +• Because the type is coming from a PHPDoc, you can turn off this check by setting treatPhpDocTypesAsCertain: false in your %configurationFile%.", ], ]; @@ -1126,13 +1132,15 @@ public function testLowercaseString(): void $errors[] = [ "Strict comparison using === between lowercase-string|false and 'AB' will always evaluate to false.", 28, - 'Because the type is coming from a PHPDoc, you can turn off this check by setting treatPhpDocTypesAsCertain: false in your %configurationFile%.', + "• 'AB' is not lowercase. +• Because the type is coming from a PHPDoc, you can turn off this check by setting treatPhpDocTypesAsCertain: false in your %configurationFile%.", ]; } else { $errors[] = [ "Strict comparison using === between lowercase-string and 'AB' will always evaluate to false.", 28, - 'Because the type is coming from a PHPDoc, you can turn off this check by setting treatPhpDocTypesAsCertain: false in your %configurationFile%.', + "• 'AB' is not lowercase. +• Because the type is coming from a PHPDoc, you can turn off this check by setting treatPhpDocTypesAsCertain: false in your %configurationFile%.", ]; } @@ -1153,15 +1161,18 @@ public function testHashing(): void [ "Strict comparison using === between lowercase-string&non-falsy-string and 'ABC' will always evaluate to false.", 9, + "'ABC' is not lowercase.", ], [ "Strict comparison using === between (lowercase-string&non-falsy-string)|false and 'ABC' will always evaluate to false.", 12, + "'ABC' is not lowercase.", ], [ "Strict comparison using === between (lowercase-string&non-falsy-string)|(non-falsy-string&numeric-string) and 'A' will always evaluate to false.", 31, - 'Because the type is coming from a PHPDoc, you can turn off this check by setting treatPhpDocTypesAsCertain: false in your %configurationFile%.', + "• 'A' is not lowercase. +• Because the type is coming from a PHPDoc, you can turn off this check by setting treatPhpDocTypesAsCertain: false in your %configurationFile%.", ], ]); }