Example #1
0
 /**
  * @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];
 }
Example #2
0
 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);
 }