public function testIsFeatureActivated200()
 {
     $community = SampleCommunitiesFixture::getCommunity(1);
     $communityId = $community->getId();
     $this->activateFeature($communityId, CollectionsFeature::getCode());
     $this->areFeaturesActivated($communityId, [CollectionsFeature::getCode() => true, BoardsFeature::getCode() => false, ChatFeature::getCode() => false]);
     $this->activateFeature($communityId, ChatFeature::getCode());
     $this->areFeaturesActivated($communityId, [CollectionsFeature::getCode() => true, BoardsFeature::getCode() => false, ChatFeature::getCode() => true]);
     $this->activateFeature($communityId, BoardsFeature::getCode());
     $this->areFeaturesActivated($communityId, [CollectionsFeature::getCode() => true, BoardsFeature::getCode() => true, ChatFeature::getCode() => true]);
     $this->deactivateFeature($communityId, CollectionsFeature::getCode());
     $this->areFeaturesActivated($communityId, [CollectionsFeature::getCode() => false, BoardsFeature::getCode() => true, ChatFeature::getCode() => true]);
     $this->deactivateFeature($communityId, BoardsFeature::getCode());
     $this->deactivateFeature($communityId, ChatFeature::getCode());
     $this->areFeaturesActivated($communityId, [CollectionsFeature::getCode() => false, BoardsFeature::getCode() => false, ChatFeature::getCode() => false]);
     $this->activateFeature($communityId, CollectionsFeature::getCode());
     $this->activateFeature($communityId, BoardsFeature::getCode());
     $this->activateFeature($communityId, ChatFeature::getCode());
     $this->areFeaturesActivated($communityId, [CollectionsFeature::getCode() => true, BoardsFeature::getCode() => true, ChatFeature::getCode() => true]);
     $this->deactivateFeature($communityId, CollectionsFeature::getCode());
     $this->deactivateFeature($communityId, BoardsFeature::getCode());
     $this->deactivateFeature($communityId, ChatFeature::getCode());
     $this->areFeaturesActivated($communityId, [CollectionsFeature::getCode() => false, BoardsFeature::getCode() => false, ChatFeature::getCode() => false]);
 }
示例#2
0
 public function __construct(Container $container)
 {
     $this->container = $container;
     $this->FEATURES = [CollectionsFeature::getCode() => CollectionsFeature::class, BoardsFeature::getCode() => BoardsFeature::class, ChatFeature::getCode() => ChatFeature::class];
 }