setIdentity($slug); $this->assertEquals($slug, $requestedEntity->getSlug()); $this->assertFalse($requestedEntity->hasId()); $id = 123; $requestedEntity->setIdentity($id); $this->assertEquals($id, $requestedEntity->getId()); $this->assertFalse($requestedEntity->hasSlug()); } }