diff --git a/src/Model/Provider.php b/src/Model/Provider.php index c484d3c..a07c9d4 100644 --- a/src/Model/Provider.php +++ b/src/Model/Provider.php @@ -30,6 +30,19 @@ public function getId() return $this->id; } + /** + * Sets Provider name + * + * @param string $name + * @return self + */ + public function setName($name) + { + $this->name = $name; + + return $this; + } + /** * {@inheritDoc} */ diff --git a/tests/OauthClientTest/Doctrine/UserProviderManagerTest.php b/tests/OauthClientTest/Doctrine/UserProviderManagerTest.php index 43ce958..b343647 100644 --- a/tests/OauthClientTest/Doctrine/UserProviderManagerTest.php +++ b/tests/OauthClientTest/Doctrine/UserProviderManagerTest.php @@ -69,7 +69,7 @@ public function testFindByUser() $userProviderManager = new UserProviderManager($objectManager, $class); $userProvider = $this->getMock('Hrevert\OauthClient\Model\UserProvider'); - $userProviders = [new UserProvider, $userProvider](); + $userProviders = [new UserProvider, $userProvider]; $user = $this->getMock('Hrevert\OauthClient\Model\UserInterface'); $repository->expects($this->once()) diff --git a/tests/OauthClientTest/Model/ProviderTest.php b/tests/OauthClientTest/Model/ProviderTest.php index adfe34a..d75481d 100644 --- a/tests/OauthClientTest/Model/ProviderTest.php +++ b/tests/OauthClientTest/Model/ProviderTest.php @@ -6,12 +6,12 @@ class ProviderTest extends \PHPUnit_Framework_TestCase { - public function testGetters() + public function testSettersAndGetters() { $provider = new Provider(); Property::set($provider, 'id', 105); - Property::set($provider, 'name', 'Twitter'); + $provider->setName('Twitter'); $this->assertEquals(105, $provider->getId()); $this->assertEquals('Twitter', $provider->getName());