Skip to content

Commit 1369ff3

Browse files
rskuipersrquadling
authored andcommitted
Refactor notEq, notSame and notInArray assertion messages (#259)
1 parent 947a370 commit 1369ff3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/Assert/Assertion.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ public static function notEq($value1, $value2, $message = null, $propertyPath =
336336
{
337337
if ($value1 == $value2) {
338338
$message = \sprintf(
339-
static::generateMessage($message ?: 'Value "%s" is equal to expected value "%s".'),
339+
static::generateMessage($message ?: 'Value "%s" was not expected to be equal to value "%s".'),
340340
static::stringify($value1),
341341
static::stringify($value2)
342342
);
@@ -360,7 +360,7 @@ public static function notSame($value1, $value2, $message = null, $propertyPath
360360
{
361361
if ($value1 === $value2) {
362362
$message = \sprintf(
363-
static::generateMessage($message ?: 'Value "%s" is the same as expected value "%s".'),
363+
static::generateMessage($message ?: 'Value "%s" was not expected to be the same as value "%s".'),
364364
static::stringify($value1),
365365
static::stringify($value2)
366366
);
@@ -384,7 +384,7 @@ public static function notInArray($value, array $choices, $message = null, $prop
384384
{
385385
if (true === \in_array($value, $choices)) {
386386
$message = \sprintf(
387-
static::generateMessage($message ?: 'Value "%s" is in given "%s".'),
387+
static::generateMessage($message ?: 'Value "%s" was not expected to be an element of the values: %s'),
388388
static::stringify($value),
389389
static::stringify($choices)
390390
);

0 commit comments

Comments
 (0)