silverstripe /
silverstripe-login-forms
| 1 | <?php |
||
| 2 | |||
| 3 | namespace SilverStripe\LoginForms\Tests; |
||
| 4 | |||
| 5 | use SilverStripe\Core\Config\Config; |
||
|
0 ignored issues
–
show
|
|||
| 6 | use SilverStripe\Dev\FunctionalTest; |
||
|
0 ignored issues
–
show
The type
SilverStripe\Dev\FunctionalTest was not found. Maybe you did not declare it correctly or list all dependencies?
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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 7 | use SilverStripe\LoginForms\EnablerExtension; |
||
| 8 | use SilverStripe\Security\Security; |
||
|
0 ignored issues
–
show
The type
SilverStripe\Security\Security was not found. Maybe you did not declare it correctly or list all dependencies?
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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 9 | use SilverStripe\View\SSViewer; |
||
|
0 ignored issues
–
show
The type
SilverStripe\View\SSViewer was not found. Maybe you did not declare it correctly or list all dependencies?
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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 10 | |||
| 11 | class EnablerExtensionTest extends FunctionalTest |
||
| 12 | { |
||
| 13 | protected $usesDatabase = true; |
||
| 14 | |||
| 15 | protected function setUp() |
||
| 16 | { |
||
| 17 | parent::setUp(); |
||
| 18 | $config = Config::modify(); |
||
| 19 | $config->set(SSViewer::class, 'themes', [ |
||
| 20 | '$public', |
||
| 21 | '$default', |
||
| 22 | ]); |
||
| 23 | $config->set(EnablerExtension::class, 'login_themes', [ |
||
| 24 | 'silverstripe/login-forms:login-forms', |
||
| 25 | '$default', |
||
| 26 | ]); |
||
| 27 | $config->set(EnablerExtension::class, 'excluded_actions', [ |
||
| 28 | 'index', |
||
| 29 | 'ping', |
||
| 30 | ]); |
||
| 31 | } |
||
| 32 | |||
| 33 | public function testThatSecurityActionsHaveUpdatedThemeListApplied() |
||
| 34 | { |
||
| 35 | $this->get(Security::login_url()); |
||
| 36 | $this->assertContains('silverstripe/login-forms:login-forms', SSViewer::get_themes()); |
||
| 37 | } |
||
| 38 | |||
| 39 | public function testThatExcludedActionsDoNotHaveTheUpdatedThemeListApplied() |
||
| 40 | { |
||
| 41 | $this->get('Security/index'); |
||
| 42 | $this->assertNotContains('silverstripe/login-forms:login-forms', SSViewer::get_themes()); |
||
| 43 | } |
||
| 44 | } |
||
| 45 |
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