|  | 
| 11 | 11 | final class AssertEqualsIsDiscouragedRuleTest extends RuleTestCase | 
| 12 | 12 | { | 
| 13 | 13 | 
 | 
| 14 |  | -	private const ERROR_MESSAGE = 'You should use assertSame() instead of assertEquals(), because both values are scalars of the same type'; | 
|  | 14 | +	private const ERROR_MESSAGE_EQUALS = 'You should use assertSame() instead of assertEquals(), because both values are scalars of the same type'; | 
|  | 15 | +	private const ERROR_MESSAGE_NOT_EQUALS = 'You should use assertNotSame() instead of assertNotEquals(), because both values are scalars of the same type'; | 
| 15 | 16 | 
 | 
| 16 | 17 | 	public function testRule(): void | 
| 17 | 18 | 	{ | 
| 18 | 19 | 		$this->analyse([__DIR__ . '/data/assert-equals-is-discouraged.php'], [ | 
| 19 |  | -			[self::ERROR_MESSAGE, 19], | 
| 20 |  | -			[self::ERROR_MESSAGE, 22], | 
| 21 |  | -			[self::ERROR_MESSAGE, 23], | 
| 22 |  | -			[self::ERROR_MESSAGE, 24], | 
| 23 |  | -			[self::ERROR_MESSAGE, 25], | 
| 24 |  | -			[self::ERROR_MESSAGE, 26], | 
| 25 |  | -			[self::ERROR_MESSAGE, 27], | 
| 26 |  | -			[self::ERROR_MESSAGE, 28], | 
| 27 |  | -			[self::ERROR_MESSAGE, 29], | 
| 28 |  | -			[self::ERROR_MESSAGE, 30], | 
| 29 |  | -			[self::ERROR_MESSAGE, 32], | 
| 30 |  | -			[self::ERROR_MESSAGE, 37], | 
| 31 |  | -			[self::ERROR_MESSAGE, 38], | 
| 32 |  | -			[self::ERROR_MESSAGE, 39], | 
|  | 20 | +			[self::ERROR_MESSAGE_EQUALS, 19], | 
|  | 21 | +			[self::ERROR_MESSAGE_EQUALS, 22], | 
|  | 22 | +			[self::ERROR_MESSAGE_EQUALS, 23], | 
|  | 23 | +			[self::ERROR_MESSAGE_EQUALS, 24], | 
|  | 24 | +			[self::ERROR_MESSAGE_EQUALS, 25], | 
|  | 25 | +			[self::ERROR_MESSAGE_EQUALS, 26], | 
|  | 26 | +			[self::ERROR_MESSAGE_EQUALS, 27], | 
|  | 27 | +			[self::ERROR_MESSAGE_EQUALS, 28], | 
|  | 28 | +			[self::ERROR_MESSAGE_EQUALS, 29], | 
|  | 29 | +			[self::ERROR_MESSAGE_EQUALS, 30], | 
|  | 30 | +			[self::ERROR_MESSAGE_EQUALS, 32], | 
|  | 31 | +			[self::ERROR_MESSAGE_NOT_EQUALS, 37], | 
|  | 32 | +			[self::ERROR_MESSAGE_NOT_EQUALS, 38], | 
|  | 33 | +			[self::ERROR_MESSAGE_NOT_EQUALS, 39], | 
| 33 | 34 | 		]); | 
| 34 | 35 | 	} | 
| 35 | 36 | 
 | 
|  | 
0 commit comments