From 047609b0c80fbab582ac1569f5f58757059c9924 Mon Sep 17 00:00:00 2001 From: Morgan Pichat Date: Tue, 27 Feb 2024 17:47:05 +0100 Subject: [PATCH] Enable multistore feature flag for API --- .../ApiPlatform/ProductMultiShopEndpointTest.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/Integration/ApiPlatform/ProductMultiShopEndpointTest.php b/tests/Integration/ApiPlatform/ProductMultiShopEndpointTest.php index ee4aab2..ff8abf1 100644 --- a/tests/Integration/ApiPlatform/ProductMultiShopEndpointTest.php +++ b/tests/Integration/ApiPlatform/ProductMultiShopEndpointTest.php @@ -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; @@ -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 @@ -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