Пример #1
0
 protected function createUser()
 {
     $user = new User();
     $user->setEmail('*****@*****.**');
     $user->setPassword('blubb');
     return $user;
 }
Пример #2
0
 public function testPasswordGetsHashedWhenUserIsCreatedOrUpdated()
 {
     $newUser = new User('*****@*****.**');
     $newUser->hashPassword('test1');
     $this->expectRepositorySavesEqualTo($newUser);
     $data = (object) array('email' => '*****@*****.**', 'password' => array('password' => 'test1', 'confirmation' => 'test1'));
     $user = $this->controller->insertEntity($data);
 }