/** * @param array $configuration * @param array $entry * * @return array */ public function execute(array $configuration, array $entry) { if (isset($configuration['filter']['password']) && in_array($configuration['filter']['password'], $configuration['mapping'])) { $field = array_search($configuration['filter']['password'], $configuration['mapping']); $entry[$field] = $this->hashService->hash($entry[$field]); } return [$configuration, $entry]; }
public function setUp() { $this->service = $this->getMock(PasswordHashService::class); $this->service->expects($this->any())->method('hash')->will($this->returnValue('password')); $this->fixture = new HashPassword($this->service); }