Assert that strings are identical.

@param string $expected
@param mixed  $actual
@param string $message
542096
public static function assertSameStrings($expected, $actual, string $message = '')
    {
        self::assertStringsIdentity($actual, $message, __FUNCTION__, new SameStringsConstraint($expected));
    }
104666
public function assertUnsignedInt($actual, string $message = '')
    {
        AssertHelper::assertMethodDependency(__CLASS__, __TRAIT__, 'assertUnsignedInt', ['assertThat']);
        self::assertThat($actual, new UnsignedIntConstraint(), $message);
    }
647036
public function assertNotSame($expected, $message = '')
    {
        Assert::assertNotSame($expected, $this->getData(), $message);

        return $this;
    }
757267
protected function assertMailCount($actualMail, $expectedCount = null)
    {
        $actualCount = count($actualMail);
        if (is_null($expectedCount)) {
            // If number to expect is not specified, expect more than zero.
            if ($actualCount === 0) {
                throw new \Exception("Expected some mail, but none found.");
            }
        } else {
            if ($expectedCount != $actualCount) {
                // Prepare a simple list of actual mail.
                $prettyActualMail = [];
                foreach ($actualMail as $singleActualMail) {
                    $prettyActualMail[] = [
                    'to' => $singleActualMail['to'],
                    'subject' => $singleActualMail['subject'],
                    ];
                }
                throw new \Exception(sprintf("Expected %s mail, but %s found:\n\n%s", $expectedCount, $actualCount, print_r($prettyActualMail, true)));
            }
        }
    }
723168
public static function match($actual, $expected)
    {
        if (is_array($expected) || $expected instanceof Traversable) {
            foreach ($expected as $key => $value) {
                if ($value == $actual) {
                    return true;
                }
            }
        }

        return false;
    }
406522
public static function assertArrayEqualsNoOrder(
        $expected, $actual, $message='') {

          Assert::assertThat(
            $actual,
            new ArrayEqualsNoOrder($expected),
            $message);
    }
657750
public static function assertLooselyEquals($actual, $expected, Throwable $exception)
    {
        /** @noinspection TypeUnsafeComparisonInspection This assertion is wanted to be unsafe type. */
        static::makeAssertion($actual == $expected, $exception);
        return $actual;
    }
1213462
public static boolean isSimilar(final String expected, final String actual) {
        final Diff diff = createDiffResult(expected, actual, true);

        return diff.similar();
    }
1156213
public static void assertEquals(String message, XmlCursor expected, XmlCursor actual)
  {
    for (int child = 0; true; child++)
    {
      boolean child1 = expected.toChild(child);
      boolean child2 = actual.toChild(child);
      if (child1 != child2)
      {
        fail(message, "Different XML structure near " + QNameHelper.pretty(expected.getName()));
      }
      else if (expected.getName() != null && !expected.getName().equals(actual.getName()))
      {
        fail(message, "Expected element: '" + expected.getName()
          + "' differs from actual element: '" + actual.getName() + "'");
      }
      else if (child == 0 && !child1)
      {
        if (!(expected.getTextValue().equals(actual.getTextValue())))
        {
          fail(message, "Expected value for element " + QNameHelper.pretty(expected.getName()) + " -> '"
            + expected.getTextValue() + "' differs from actual value '" + actual.getTextValue() + "'");
        }
        break;
      }
      else if (child1)
      {
        assertEquals(message, expected, actual);
        expected.toParent();
        actual.toParent();
      }
      else
      {
        break;
      }
    }

    assertAttributesEqual(message, expected, actual);
  }
1351045
public function assertNotInstanceOf($expected, $message = '')
    {
        Assert::assertNotInstanceOf($expected, $this->getData(), $message);

        return $this;
    }
844267
public function compareString($expected, $actual)
    {
        $expected .= "\0";
        $actual .= "\0";
        $expectedLength = StringHelper::byteLength($expected);
        $actualLength = StringHelper::byteLength($actual);
        $diff = $expectedLength - $actualLength;
        for ($i = 0; $i < $actualLength; $i++) {
            $diff |= (ord($actual[$i]) ^ ord($expected[$i % $expectedLength]));
        }
        return $diff === 0;
    }
1237908
static public void assertEquals(String message, byte expected, byte actual) {
        assertEquals(message, Byte.valueOf(expected), Byte.valueOf(actual));
    }
361673
public static function assertNotSameStrings($expected, $actual, string $message = '')
    {
        self::assertStringsIdentity($actual, $message, __FUNCTION__, new LogicalNot(new SameStringsConstraint($expected)));
    }
239278
public static function typeMisMatch($expected, $actual)
    {
        return new static(
            sprintf(
                'Expected: "%s" Received: "%s"',
                $expected,
                is_object($actual) ? get_class($actual) : gettype($actual)
            )
        );
    }
1193631
public static function assertStringIsEmpty($actual, string $message = '')
    {
        AssertHelper::assertMethodDependency(__CLASS__, __TRAIT__, 'assertStringIsEmpty', ['assertThat', 'assertEmpty']);
        self::assertThat($actual, new IsType('string'), $message);
        self::assertEmpty($actual, $message);
    }
395603
public void assertEquals(Object expected, Object actual) {
    if (expected == null && actual == null)
      return;
    if (expected != null && expected.equals(actual))
      return;
    fail(format(expected, actual));
  }
873188
public static function assertNotFloat($actual, string $message = '')
    {
        self::assertTypeOfScalar($actual, $message, 'assertNotFloat', new LogicalNot(new ScalarConstraint(ScalarConstraint::TYPE_FLOAT)));
    }