Sulu\Bundle\ContactBundle\Contact\ContactManagerInterface::getById PHP Method

getById() public method

Returns an api entity.
public getById ( $id, $locale ) : mixed
$id
$locale
return mixed
    public function getById($id, $locale);

Usage Example

 public function testGetContentDataWrongType()
 {
     $type = new ContactSelectionContentType($this->template, $this->contactManager->reveal(), $this->accountManager->reveal(), $this->serializer->reveal(), new CustomerIdConverter(), new IndexComparator());
     $this->property->getValue()->willReturn('blabla');
     $this->contactManager->getById(Argument::any(), Argument::any())->shouldNotBeCalled();
     $this->accountManager->getById(Argument::any(), Argument::any())->shouldNotBeCalled();
     $result = $type->getContentData($this->property->reveal());
     $this->assertCount(0, $result);
 }