diff --git a/core/modules/simpletest/src/TestBase.php b/core/modules/simpletest/src/TestBase.php index 028a086..82ee621 100644 --- a/core/modules/simpletest/src/TestBase.php +++ b/core/modules/simpletest/src/TestBase.php @@ -659,9 +659,11 @@ protected function assertNotNull($value, $message = '', $group = 'Other') { * TRUE if the assertion succeeded, FALSE otherwise. */ protected function assertEqual($first, $second, $message = '', $group = 'Other') { - // We cast objects implementing SafeStringInterface to string ourself so as - // to not rely on PHP casting them to string depending on what we're + // Cast objects implementing SafeStringInterface to string instead of + // relying on PHP casting them to string depending on what they are being // comparing with. + $first = $this->castSafeStrings($first); + $second = $this->castSafeStrings($second); return $this->assert($this->castSafeStrings($first) == $this->castSafeStrings($second), $message ? $message : SafeMarkup::format('Value @first is equal to value @second.', array('@first' => var_export($first, TRUE), '@second' => var_export($second, TRUE))), $group); }