Esempio n. 1
0
 public function testAuthenticateSuccess()
 {
     $role = new Role('customer', null);
     $user = new User('*****@*****.**', 'john', 'John', 'Smith', 'password');
     $user->activate();
     $user->addRole($role);
     $identity = $this->authenticator->authenticate(['authenticator' => Authenticator::AUTH_EMAIL, 'user' => $user, 'password' => 'password']);
     $this->assertEquals(new Identity(null, ['customer']), $identity);
 }