This commit is contained in:
Jaybe
2025-03-05 14:10:06 +09:00
commit 7a77932344
1905 changed files with 122510 additions and 0 deletions
@@ -0,0 +1,44 @@
<?php
namespace HybridauthTest\Hybridauth\User;
use Hybridauth\User\Activity;
class ActivityTest extends \PHPUnit\Framework\TestCase
{
public function test_instance_of()
{
$activity = new Activity();
$this->assertInstanceOf('\\Hybridauth\\User\\Activity', $activity);
}
public function test_has_attributes()
{
$activity_class = '\\Hybridauth\\User\\Activity';
$this->assertClassHasAttribute('id', $activity_class);
$this->assertClassHasAttribute('date', $activity_class);
$this->assertClassHasAttribute('text', $activity_class);
$this->assertClassHasAttribute('user', $activity_class);
}
public function test_set_attributes()
{
$activity = new Activity();
$activity->id = true;
$activity->date = true;
$activity->text = true;
$activity->user = true;
}
/**
* @expectedException \Hybridauth\Exception\UnexpectedValueException
*/
public function test_property_overloading()
{
$activity = new Activity();
$activity->slug = true;
}
}
@@ -0,0 +1,50 @@
<?php
namespace HybridauthTest\Hybridauth\User;
use Hybridauth\User\Contact;
class ContactTest extends \PHPUnit\Framework\TestCase
{
public function test_instance_of()
{
$contact = new Contact();
$this->assertInstanceOf('\\Hybridauth\\User\\Contact', $contact);
}
public function test_has_attributes()
{
$contact_class = '\\Hybridauth\\User\\Contact';
$this->assertClassHasAttribute('identifier', $contact_class);
$this->assertClassHasAttribute('webSiteURL', $contact_class);
$this->assertClassHasAttribute('profileURL', $contact_class);
$this->assertClassHasAttribute('photoURL', $contact_class);
$this->assertClassHasAttribute('displayName', $contact_class);
$this->assertClassHasAttribute('description', $contact_class);
$this->assertClassHasAttribute('email', $contact_class);
}
public function test_set_attributes()
{
$contact = new Contact();
$contact->identifier = true;
$contact->webSiteURL = true;
$contact->profileURL = true;
$contact->photoURL = true;
$contact->displayName = true;
$contact->description = true;
$contact->email = true;
}
/**
* @expectedException \Hybridauth\Exception\UnexpectedValueException
*/
public function test_property_overloading()
{
$contact = new Contact();
$contact->slug = true;
}
}
@@ -0,0 +1,80 @@
<?php
namespace HybridauthTest\Hybridauth\User;
use Hybridauth\User\Profile;
class ProfileTest extends \PHPUnit\Framework\TestCase
{
public function test_instance_of()
{
$profile = new Profile();
$this->assertInstanceOf('\\Hybridauth\\User\\Profile', $profile);
}
public function test_has_attributes()
{
$profile_class = '\\Hybridauth\\User\\Profile';
$this->assertClassHasAttribute('identifier', $profile_class);
$this->assertClassHasAttribute('webSiteURL', $profile_class);
$this->assertClassHasAttribute('profileURL', $profile_class);
$this->assertClassHasAttribute('photoURL', $profile_class);
$this->assertClassHasAttribute('displayName', $profile_class);
$this->assertClassHasAttribute('firstName', $profile_class);
$this->assertClassHasAttribute('lastName', $profile_class);
$this->assertClassHasAttribute('description', $profile_class);
$this->assertClassHasAttribute('gender', $profile_class);
$this->assertClassHasAttribute('language', $profile_class);
$this->assertClassHasAttribute('age', $profile_class);
$this->assertClassHasAttribute('birthDay', $profile_class);
$this->assertClassHasAttribute('birthMonth', $profile_class);
$this->assertClassHasAttribute('birthYear', $profile_class);
$this->assertClassHasAttribute('email', $profile_class);
$this->assertClassHasAttribute('emailVerified', $profile_class);
$this->assertClassHasAttribute('phone', $profile_class);
$this->assertClassHasAttribute('address', $profile_class);
$this->assertClassHasAttribute('country', $profile_class);
$this->assertClassHasAttribute('region', $profile_class);
$this->assertClassHasAttribute('city', $profile_class);
$this->assertClassHasAttribute('zip', $profile_class);
}
public function test_set_attributes()
{
$profile = new Profile();
$profile->identifier = true;
$profile->webSiteURL = true;
$profile->profileURL = true;
$profile->photoURL = true;
$profile->displayName = true;
$profile->firstName = true;
$profile->lastName = true;
$profile->description = true;
$profile->gender = true;
$profile->language = true;
$profile->age = true;
$profile->birthDay = true;
$profile->birthMonth = true;
$profile->birthYear = true;
$profile->email = true;
$profile->emailVerified = true;
$profile->phone = true;
$profile->address = true;
$profile->country = true;
$profile->region = true;
$profile->city = true;
$profile->zip = true;
}
/**
* @expectedException \Hybridauth\Exception\UnexpectedValueException
*/
public function test_property_overloading()
{
$profile = new Profile();
$profile->slug = true;
}
}