From 3fbfeb4b5a38bbdfe9fb3ed235a0462e7807ea40 Mon Sep 17 00:00:00 2001 From: Anna Kotiuk <79214317+annakotiuk@users.noreply.github.com> Date: Tue, 7 Jan 2025 17:05:54 +0100 Subject: [PATCH] FRW-9645 Enable feature development. (#11264) FRW-9645 Enable feature development. --- src/Spryker/Zed/Twig/TwigConfig.php | 1 + tests/SprykerTest/Yves/Twig/TwigConfigTest.php | 6 ++++++ .../Yves/Twig/_support/TwigYvesTester.php | 16 ++++++++++++++++ .../Zed/Twig/_support/Helper/TwigHelper.php | 1 + 4 files changed, 24 insertions(+) diff --git a/src/Spryker/Zed/Twig/TwigConfig.php b/src/Spryker/Zed/Twig/TwigConfig.php index 1e0dcd7..b20e221 100644 --- a/src/Spryker/Zed/Twig/TwigConfig.php +++ b/src/Spryker/Zed/Twig/TwigConfig.php @@ -85,6 +85,7 @@ protected function addCoreTemplatePaths(array $paths) } $paths[] = rtrim(APPLICATION_VENDOR_DIR, '/') . '/spryker/*/src/Spryker/Zed/%s/Presentation/'; + $paths[] = rtrim(APPLICATION_VENDOR_DIR, '/') . '/spryker-feature/*/src/SprykerFeature/Zed/%s/Presentation/'; return $paths; } diff --git a/tests/SprykerTest/Yves/Twig/TwigConfigTest.php b/tests/SprykerTest/Yves/Twig/TwigConfigTest.php index ec2f9ad..a276345 100644 --- a/tests/SprykerTest/Yves/Twig/TwigConfigTest.php +++ b/tests/SprykerTest/Yves/Twig/TwigConfigTest.php @@ -51,6 +51,8 @@ public function testGetTemplatePathsShouldReturnOnlyDefaultTemplatePaths(): void $this->tester->getPathSprykerEcoShared(), $this->tester->getPathSprykerSdk(), $this->tester->getPathSprykerSdkShared(), + $this->tester->getPathSprykerFeature(), + $this->tester->getPathSprykerFeatureShared(), ], ); } @@ -81,6 +83,8 @@ public function testGetTemplatePathsShouldReturnOnlyDefaultTemplatePathsWhenThem $this->tester->getPathSprykerEcoShared(), $this->tester->getPathSprykerSdk(), $this->tester->getPathSprykerSdkShared(), + $this->tester->getPathSprykerFeature(), + $this->tester->getPathSprykerFeatureShared(), ], ); } @@ -116,6 +120,8 @@ public function testGetTemplatePathsShouldReturnCustomAndDefaultTemplatePaths(): $this->tester->getPathSprykerEcoShared(), $this->tester->getPathSprykerSdk(), $this->tester->getPathSprykerSdkShared(), + $this->tester->getPathSprykerFeature(), + $this->tester->getPathSprykerFeatureShared(), ], ); } diff --git a/tests/SprykerTest/Yves/Twig/_support/TwigYvesTester.php b/tests/SprykerTest/Yves/Twig/_support/TwigYvesTester.php index 55af977..8cf9481 100644 --- a/tests/SprykerTest/Yves/Twig/_support/TwigYvesTester.php +++ b/tests/SprykerTest/Yves/Twig/_support/TwigYvesTester.php @@ -127,6 +127,14 @@ public function getPathSpryker(): string return rtrim(APPLICATION_VENDOR_DIR, '/') . '/*/*/src/Spryker/Yves/%s/Theme/default'; } + /** + * @return string + */ + public function getPathSprykerFeature(): string + { + return rtrim(APPLICATION_VENDOR_DIR, '/') . '/*/*/src/SprykerFeature/Yves/%s/Theme/default'; + } + /** * @return string */ @@ -135,6 +143,14 @@ public function getPathSprykerShared(): string return rtrim(APPLICATION_VENDOR_DIR, '/') . '/*/*/src/Spryker/Shared/%s/Theme/default'; } + /** + * @return string + */ + public function getPathSprykerFeatureShared(): string + { + return rtrim(APPLICATION_VENDOR_DIR, '/') . '/*/*/src/SprykerFeature/Shared/%s/Theme/default'; + } + /** * @return string */ diff --git a/tests/SprykerTest/Zed/Twig/_support/Helper/TwigHelper.php b/tests/SprykerTest/Zed/Twig/_support/Helper/TwigHelper.php index 4f88ac7..5474eff 100644 --- a/tests/SprykerTest/Zed/Twig/_support/Helper/TwigHelper.php +++ b/tests/SprykerTest/Zed/Twig/_support/Helper/TwigHelper.php @@ -189,6 +189,7 @@ protected function getConfig(): TwigConfig $twigConfig = new TwigConfig(); $paths = $twigConfig->getTemplatePaths(); $paths[] = APPLICATION_VENDOR_DIR . '/spryker/spryker/Bundles/%2$s/src/*/Zed/%1$s/Presentation'; + $paths[] = APPLICATION_VENDOR_DIR . '/spryker/spryker/Features/%2$s/src/*/Zed/%1$s/Presentation'; return $paths; }, static::MODULE_NAME);