/**
  * @param bool $expected
  * @param array $channels
  * @param bool $checkExtension
  *
  * @dataProvider channelsDataProvider
  */
 public function testHasOrganizationApplicableChannels($expected, array $channels, $checkExtension = true)
 {
     $repository = $this->getMockBuilder('\\Doctrine\\Common\\Persistence\\ObjectRepository')->disableOriginalConstructor()->getMock();
     $repository->expects($this->any())->method('findBy')->with($this->arrayHasKey('organization'))->willReturn($channels);
     $this->doctrineHelper->expects($this->any())->method('getEntityRepository')->will($this->returnValue($repository));
     $this->assertEquals($expected, $this->provider->hasOrganizationApplicableChannels(new Organization(), $checkExtension));
 }
 /**
  * @param ResultRecordInterface $record
  * @param bool $checkExtension
  *
  * @return bool
  */
 protected function isChannelApplicable(ResultRecordInterface $record, $checkExtension = true)
 {
     $channelId = $record->getValue(self::CHANNEL_KEY);
     return $this->channelSettingsProvider->isChannelApplicable($channelId, $checkExtension);
 }