Ejemplo n.º 1
0
 public function testProfile()
 {
     $profile = new Profile();
     $profile->identifier = 'identifier';
     $profile->webSiteURL = 'webSiteURL';
     $profile->profileURL = 'profileURL';
     $profile->photoURL = 'photoURL';
     $profile->displayName = 'displayName';
     $profile->description = 'description';
     $profile->firstName = 'firstName';
     $profile->lastName = 'lastName';
     $profile->gender = 'male';
     $profile->language = 'language';
     $profile->age = 'age';
     $profile->birthDay = 'birthDay';
     $profile->birthMonth = 'birthMonth';
     $profile->birthYear = 'birthYear';
     $profile->email = 'email';
     $profile->emailVerified = 'emailVerified';
     $profile->phone = 'phone';
     $profile->address = 'address';
     $profile->country = 'CH';
     $profile->region = 'region';
     $profile->city = 'city';
     $profile->zip = 'zip';
     $country = new Country();
     $user = new User();
     $user->fromProfile($profile, $country);
     $this->assertSame('photoURL', $user->getPhoto());
     $this->assertSame('description', $user->getDescription());
     $this->assertSame('firstName', $user->getFirstname());
     $this->assertSame('lastName', $user->getLastname());
     $this->assertSame(1, $user->getSex());
     $this->assertSame('la', $user->getLanguage());
     $this->assertSame('phone', $user->getPhone());
     $this->assertSame('address', $user->getStreet());
     $this->assertSame($country, $user->getCountry());
     $this->assertSame('region', $user->getArea());
     $this->assertSame('city', $user->getLocality());
     $this->assertSame('zip', $user->getPostcode());
     $this->assertSame('email', $user->getEmail());
 }