/**
  * @covers \User\GitHub\LoginListener::onRegister
  */
 public function testOnRegisterWithValidEvent()
 {
     $user = new User();
     $profile = new Hybrid_User_Profile();
     $photoUrl = 'http://placehold.it/50x50';
     $profile->photoURL = $photoUrl;
     $profile->profileURL = 'https://github.com/username';
     $event = new Event(null, null, ['user' => $user, 'userProfile' => $profile, 'provider' => 'github']);
     $this->listener->onRegister($event);
     $this->assertSame('username', $user->getUsername());
     $this->assertSame($photoUrl, $user->getPhotoUrl());
 }
 public function testSetPhotoUrl()
 {
     $photoUrl = 'http://www.example.com/photo.jpg';
     $this->user->setPhotoUrl($photoUrl);
     $this->assertSame($photoUrl, $this->user->getPhotoUrl());
 }