protected function createUser() { $user = new User(); $user->setEmail('*****@*****.**'); $user->setPassword('blubb'); return $user; }
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); }