示例#1
0
 /**
  */
 public function testLoad()
 {
     $id = 1;
     /** @var EntityInterface|ObjectProphecy $entity */
     $entity = $this->prophesize('AppBundle\\Entity\\EntityInterface');
     $this->repository->find($id)->willReturn($entity->reveal())->shouldBeCalledTimes(1);
     $this->assertSame($entity->reveal(), $this->manager->load($id));
 }
示例#2
0
 /**
  * @param int $id
  *
  * @return EntityInterface
  */
 public function load($id)
 {
     return $this->repository->find($id);
 }