Skip to content

Commit

Permalink
FRW-9645 Enable feature development. (#11264)
Browse files Browse the repository at this point in the history
FRW-9645 Enable feature development.
  • Loading branch information
annakotiuk authored Jan 7, 2025
1 parent 211af00 commit 3fbfeb4
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Spryker/Zed/Twig/TwigConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
6 changes: 6 additions & 0 deletions tests/SprykerTest/Yves/Twig/TwigConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ public function testGetTemplatePathsShouldReturnOnlyDefaultTemplatePaths(): void
$this->tester->getPathSprykerEcoShared(),
$this->tester->getPathSprykerSdk(),
$this->tester->getPathSprykerSdkShared(),
$this->tester->getPathSprykerFeature(),
$this->tester->getPathSprykerFeatureShared(),
],
);
}
Expand Down Expand Up @@ -81,6 +83,8 @@ public function testGetTemplatePathsShouldReturnOnlyDefaultTemplatePathsWhenThem
$this->tester->getPathSprykerEcoShared(),
$this->tester->getPathSprykerSdk(),
$this->tester->getPathSprykerSdkShared(),
$this->tester->getPathSprykerFeature(),
$this->tester->getPathSprykerFeatureShared(),
],
);
}
Expand Down Expand Up @@ -116,6 +120,8 @@ public function testGetTemplatePathsShouldReturnCustomAndDefaultTemplatePaths():
$this->tester->getPathSprykerEcoShared(),
$this->tester->getPathSprykerSdk(),
$this->tester->getPathSprykerSdkShared(),
$this->tester->getPathSprykerFeature(),
$this->tester->getPathSprykerFeatureShared(),
],
);
}
Expand Down
16 changes: 16 additions & 0 deletions tests/SprykerTest/Yves/Twig/_support/TwigYvesTester.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand All @@ -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
*/
Expand Down
1 change: 1 addition & 0 deletions tests/SprykerTest/Zed/Twig/_support/Helper/TwigHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3fbfeb4

Please sign in to comment.