You are here

protected function AssertLegacyTrait::assertIdenticalObject in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/KernelTests/AssertLegacyTrait.php \Drupal\KernelTests\AssertLegacyTrait::assertIdenticalObject()

Deprecated Scheduled for removal in Drupal 10.0.0. Use self::assertEquals() instead.

See also

\Drupal\simpletest\TestBase::assertIdenticalObject()

File

core/tests/Drupal/KernelTests/AssertLegacyTrait.php, line 76

Class

AssertLegacyTrait
Translates Simpletest assertion methods to PHPUnit.

Namespace

Drupal\KernelTests

Code

protected function assertIdenticalObject($actual, $expected, $message = '') {

  // Note: ::assertSame checks whether its the same object. ::assertEquals
  // though compares
  $this
    ->assertEquals($expected, $actual, (string) $message);
}