mitch
mitch

From documentation:

Functional tests can be performed by running phpunit in the /tests/functional directory. Ensure the following configuration is met:

Active theme is: demo
Language preference is: en

Discussed here, but not solved: https://stackoverflow.com/questions/55841944/how-to-set-up-active-theme-for-plugin-test-in-october-cms

How to set up this configuration in functional tests?

marc.jauvin24240
marc.jauvin24240

Plugins and themes namespace/folders are completely seperate

aniket.magadum39173
aniket.magadum39173

Even I am struggling to get this to work. It points to the default fixture theme

Lewis-H
Lewis-H

You can use getActiveTheme and setActiveTheme

// store old code once your testing done it should return to default theme $oldTheme = Theme::getActiveTheme(); Theme::resetCache(); Theme::setActiveTheme('<theme.code>');

// at last Theme::setActiveTheme($oldTheme); may be this should help. Regards, Lewis Tech-consultant https://www.apps4rent.com

Last updated

1-4 of 4