Example #1
0
 public function testUserPasswordCallsPasswordAttribute()
 {
     User::setHasher($hasher = m::mock('Cartalyst\\Sentry\\Hashing\\HasherInterface'));
     $hasher->shouldReceive('hash')->with('unhashed_password_here')->once()->andReturn('hashed_password_here');
     $user = new User();
     $user->password = '******';
     $this->assertEquals('hashed_password_here', $user->getPassword());
 }