function Assert::assertSame
Asserts that two variables have the same type and value. Used on objects, it asserts that two variables reference the same object.
@psalm-template ExpectedType
@psalm-param ExpectedType $expected
@psalm-assert =ExpectedType $actual
Throws
11 calls to Assert::assertSame()
- AbstractTransportFactoryTestCase::testSupports in vendor/
symfony/ mailer/ Test/ AbstractTransportFactoryTestCase.php - @dataProvider supportsProvider
- AssertingContextualValidator::doAtPath in vendor/
symfony/ validator/ Test/ ConstraintValidatorTestCase.php - AssertingContextualValidator::doValidate in vendor/
symfony/ validator/ Test/ ConstraintValidatorTestCase.php - CompoundConstraintTestCase::assertNoViolation in vendor/
symfony/ validator/ Test/ CompoundConstraintTestCase.php - ConstraintValidatorTestCase::assertNoViolation in vendor/
symfony/ validator/ Test/ ConstraintValidatorTestCase.php
File
-
vendor/
phpunit/ phpunit/ src/ Framework/ Assert.php, line 980
Class
- Assert
- @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
Namespace
PHPUnit\FrameworkCode
public static final function assertSame(mixed $expected, mixed $actual, string $message = '') : void {
static::assertThat($actual, new IsIdentical($expected), $message);
}