Skip to content

Commit

Permalink
Enable multistore feature flag for API
Browse files Browse the repository at this point in the history
  • Loading branch information
Morgan Pichat committed Feb 28, 2024
1 parent dc19a0c commit 047609b
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@
namespace PsApiResourcesTest\Integration\ApiPlatform;

use PrestaShop\PrestaShop\Core\Domain\Product\ValueObject\ProductType;
use PrestaShop\PrestaShop\Core\FeatureFlag\FeatureFlagSettings;
use PrestaShop\PrestaShop\Core\Multistore\MultistoreConfig;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Contracts\HttpClient\ResponseInterface;
use Tests\Resources\Resetter\ConfigurationResetter;
use Tests\Resources\Resetter\FeatureFlagResetter;
use Tests\Resources\Resetter\LanguageResetter;
use Tests\Resources\Resetter\ProductResetter;
use Tests\Resources\Resetter\ShopResetter;
Expand Down Expand Up @@ -83,6 +85,9 @@ public static function setUpBeforeClass(): void
],
'active' => false,
];

$featureFlagManager = self::getContainer()->get('PrestaShop\PrestaShop\Core\FeatureFlag\FeatureFlagManager');
$featureFlagManager->enable(FeatureFlagSettings::FEATURE_FLAG_AUTHORIZATION_SERVER_MULTISTORE);
}

public function getProtectedEndpoints(): iterable
Expand All @@ -102,6 +107,7 @@ public static function tearDownAfterClass(): void
ConfigurationResetter::resetConfiguration();
// Reset modules folder that are removed with the FR language
(new ResourceResetter())->resetTestModules();
FeatureFlagResetter::resetFeatureFlags();
}

public function testShopContextIsRequired(): void
Expand Down

0 comments on commit 047609b

Please sign in to comment.