Loading core/tests/Drupal/KernelTests/Core/Test/Comparator/MarkupInterfaceComparatorTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -109,7 +109,7 @@ public static function dataSetProvider() { new FormattableMarkup('GoldFinger', []), ['GoldFinger'], FALSE, FALSE, \InvalidArgumentException::class, ], 'stdClass vs TranslatableMarkup' => [ (object) ['GoldFinger'], Loading core/tests/Drupal/TestTools/Comparator/MarkupInterfaceComparator.php +3 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,9 @@ public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = F if (is_scalar($expected) && is_scalar($actual)) { throw new \LogicException(__METHOD__ . '() should not be called directly. Use TestCase::assertEquals() instead'); } if (is_array($expected) || is_array($actual)) { throw new \InvalidArgumentException('Expected and actual arguments passed to ' . __METHOD__ . '() must not be arrays'); } $expected_safe = (string) $expected; $actual_safe = (string) $actual; $expected_safe_stripped = strip_tags($expected_safe); Loading Loading
core/tests/Drupal/KernelTests/Core/Test/Comparator/MarkupInterfaceComparatorTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -109,7 +109,7 @@ public static function dataSetProvider() { new FormattableMarkup('GoldFinger', []), ['GoldFinger'], FALSE, FALSE, \InvalidArgumentException::class, ], 'stdClass vs TranslatableMarkup' => [ (object) ['GoldFinger'], Loading
core/tests/Drupal/TestTools/Comparator/MarkupInterfaceComparator.php +3 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,9 @@ public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = F if (is_scalar($expected) && is_scalar($actual)) { throw new \LogicException(__METHOD__ . '() should not be called directly. Use TestCase::assertEquals() instead'); } if (is_array($expected) || is_array($actual)) { throw new \InvalidArgumentException('Expected and actual arguments passed to ' . __METHOD__ . '() must not be arrays'); } $expected_safe = (string) $expected; $actual_safe = (string) $actual; $expected_safe_stripped = strip_tags($expected_safe); Loading