/** * @return string * @throws LiveBroadcastOutputException */ public function getEntityId() { if (!$this->channel instanceof ChannelFacebook) { throw new LiveBroadcastOutputException(__FUNCTION__ . ' Facebook channel not configured'); } return $this->channel->getFbEntityId(); }
/** * Test the isEntityConfigured method */ public function testIsEntityConfigured() { $channel = new ChannelFacebook(); $configuration = array(); self::assertFalse($channel->isEntityConfigured($configuration)); $configuration['facebook'] = array(); self::assertFalse($channel->isEntityConfigured($configuration)); $configuration['facebook']['application_id'] = null; self::assertFalse($channel->isEntityConfigured($configuration)); $configuration['facebook']['application_secret'] = null; self::assertFalse($channel->isEntityConfigured($configuration)); $configuration['facebook']['application_id'] = 'ID'; self::assertFalse($channel->isEntityConfigured($configuration)); $configuration['facebook']['application_secret'] = 'SECRET'; self::assertTrue($channel->isEntityConfigured($configuration)); }
/** * Setup a testable Facebook channel */ public function setUp() { $this->facebookChannel = new ChannelFacebook(); $this->facebookChannel->setAccessToken('token'); $this->facebookChannel->setFbEntityId('id'); }