/**
  * Test Get/Set, create, endpoint methods.
  */
 public function testChannelTokenEntity()
 {
     $channelToken = ChannelToken::create();
     $this->assertInstanceOf('Shoko\\TwitchApiBundle\\Model\\Entity\\ChannelToken', $channelToken);
     $this->assertEquals(null, $channelToken->getToken());
     $this->assertEquals('some_token', $channelToken->setToken('some_token')->getToken());
     $this->assertEquals(null, $channelToken->getSig());
     $this->assertEquals('some_sig', $channelToken->setSig('some_sig')->getSig());
     $this->assertEquals(false, $channelToken->isMobileRestricted());
     $this->assertEquals(true, $channelToken->setMobileRestricted(true)->isMobileRestricted());
 }
 /**
  * @param array $data
  *
  * @return ChannelToken
  */
 public function createChannelToken(array $data)
 {
     $channelToken = ChannelToken::create();
     if (isset($data['token'])) {
         $channelToken = $channelToken->setToken($data['token']);
     }
     if (isset($data['sig'])) {
         $channelToken = $channelToken->setSig($data['sig']);
     }
     if (isset($data['mobile_restricted'])) {
         $channelToken = $channelToken->setMobileRestricted($data['mobile_restricted']);
     }
     return $channelToken;
 }