protected function AssertLegacyTrait::assertIdenticalObject in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/KernelTests/AssertLegacyTrait.php \Drupal\KernelTests\AssertLegacyTrait::assertIdenticalObject()
Deprecated
in drupal:8.0.0 and is removed from drupal:10.0.0. Use $this->assertEquals() instead.
See also
\Drupal\simpletest\TestBase::assertIdenticalObject()
https://www.drupal.org/node/3129738
1 call to AssertLegacyTrait::assertIdenticalObject()
- KernelTestBaseTest::testAssertIdenticalObject in core/
tests/ Drupal/ KernelTests/ KernelTestBaseTest.php - Tests the deprecation of AssertLegacyTrait::assertIdenticalObject.
File
- core/
tests/ Drupal/ KernelTests/ AssertLegacyTrait.php, line 91
Class
- AssertLegacyTrait
- Translates Simpletest assertion methods to PHPUnit.
Namespace
Drupal\KernelTestsCode
protected function assertIdenticalObject($actual, $expected, $message = '') {
@trigger_error('AssertLegacyTrait::assertIdenticalObject() is deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. Use $this->assertEquals() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
// Note: ::assertSame checks whether its the same object. ::assertEquals
// though compares
$this
->assertEquals($expected, $actual, (string) $message);
}