/** * @param string $entityType * @param object $entity * @param string $identifier * @return object * @throws \Exception */ public function load($entityType, $entity, $identifier) { $operation = $this->orchestratorPool->getReadOperation($entityType); return $operation->execute($entityType, $entity, $identifier); }
public function testGetReadOperationDefault() { $entityType = 'test_read_entity_type'; $this->assertEquals('Read_Operation', $this->model->getReadOperation($entityType)); }
public function testGetReadOperation() { $entityType = 'test_read_entity_type'; $this->objectManagerMock->expects($this->once())->method('get')->with('ReadOperation')->willReturn($this->readOperationMock); $this->assertEquals($this->readOperationMock, $this->model->getReadOperation($entityType)); }