ElggCoreUnitTest::assertIdenticalEntities PHP Method

assertIdenticalEntities() public method

Will trigger a pass if the two entity parameters have the same "value" and same type. Otherwise a fail.
public assertIdenticalEntities ( ElggEntity $first, ElggEntity $second, string $message = '%s' ) : boolean
$first ElggEntity Entity to compare.
$second ElggEntity Entity to compare.
$message string Message to display.
return boolean
    public function assertIdenticalEntities(\ElggEntity $first, \ElggEntity $second, $message = '%s')
    {
        if (!($res = $this->assertIsA($first, '\\ElggEntity'))) {
            return $res;
        }
        if (!($res = $this->assertIsA($second, '\\ElggEntity'))) {
            return $res;
        }
        if (!($res = $this->assertEqual(get_class($first), get_class($second)))) {
            return $res;
        }
        return $this->assert(new IdenticalEntityExpectation($first), $second, $message);
    }