Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Assert.php

function Assert::assertEquals

Asserts that two variables are equal.

Throws

ExpectationFailedException

20 calls to Assert::assertEquals()
AbstractTransportFactoryTestCase::testCreate in vendor/symfony/mailer/Test/AbstractTransportFactoryTestCase.php
@dataProvider createProvider
Assert::assertXmlFileEqualsXmlFile in vendor/phpunit/phpunit/src/Framework/Assert.php
Asserts that two XML files are equal.
Assert::assertXmlStringEqualsXmlFile in vendor/phpunit/phpunit/src/Framework/Assert.php
Asserts that two XML documents are equal.
Assert::assertXmlStringEqualsXmlString in vendor/phpunit/phpunit/src/Framework/Assert.php
Asserts that two XML documents are equal.
ConstraintValidatorTestCase::expectFailingValueValidation in vendor/symfony/validator/Test/ConstraintValidatorTestCase.php

... See full list

File

vendor/phpunit/phpunit/src/Framework/Assert.php, line 272

Class

Assert
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit

Namespace

PHPUnit\Framework

Code

public static final function assertEquals(mixed $expected, mixed $actual, string $message = '') : void {
    $constraint = new IsEqual($expected);
    static::assertThat($actual, $constraint, $message);
}
RSS feed
Powered by Drupal