1 | <?php |
||
2 | declare(strict_types=1); |
||
3 | |||
4 | namespace TddWizard\Fixtures\Theme; |
||
5 | |||
6 | use Magento\Framework\View\DesignInterface; |
||
7 | use Magento\TestFramework\Helper\Bootstrap; |
||
0 ignored issues
–
show
|
|||
8 | use Magento\Theme\Model\Theme\Registration; |
||
9 | |||
10 | /** |
||
11 | * A fixture to test theme features, e.g. with with test themes in `@magentoComponentsDir` |
||
12 | */ |
||
13 | class ThemeFixture |
||
14 | { |
||
15 | |||
16 | /** |
||
17 | * Register new themes from the `@magentoComponentsDir` fixture in the database |
||
18 | */ |
||
19 | 1 | public static function registerTestThemes(): void |
|
20 | { |
||
21 | /** @var Registration $registration */ |
||
22 | 1 | $registration = Bootstrap::getObjectManager()->get(Registration::class); |
|
23 | 1 | $registration->register(); |
|
24 | 1 | } |
|
25 | |||
26 | /** |
||
27 | * Set the current theme |
||
28 | * |
||
29 | * @param string $themePath a theme identifier without the area, e.g. Magento/luma |
||
30 | */ |
||
31 | 2 | public static function setCurrentTheme(string $themePath): void |
|
32 | { |
||
33 | /** @var DesignInterface $design */ |
||
34 | 2 | $design = Bootstrap::getObjectManager()->get(DesignInterface::class); |
|
35 | 2 | $design->setDesignTheme($themePath); |
|
36 | 2 | } |
|
37 | } |
||
38 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths